As a Roblox developer, it is currently impossible to adopt an industry-standard unit testing workflow to allow my team to consistently test their code.
In the past, hacks and workarounds have allowed us to run Studio from the command line, enabling really powerful continuous integration. Unfortunately, Studio has been significantly locked down as of late, requiring absurdly complex setups that continue to break every few weeks with Studio updates. At the time of writing, nobody has had a working testing workflow for weeks.
Much like every other major development ecosystem, it should be possible to run a Roblox place from the command line to test it to allow for unit testing and other CI workflows. This is an essential feature for professional teams and studios, so much so that Roblox itself has an internal tool for this exact purpose that isn’t available to the public.
If Roblox is able to address this issue, it would improve the development experience because developers would be able to detect mistakes in code long before they became a major problem.
I share these frustrations. From what I know, I am the only one with a plugin for running unit tests graphically. However, I have to run this manually it in Roblox Studio. I have no way of running them as part of a CI/CD workflow to roll out game or model updates, which means I have no safety system for pushing out an update with major game-breaking bugs.
I have used unit testing on critical systems like data storage to simulate many error scenarios and 2 servers communicating data. Rather than hoping for the best when a scenario happens with actual players, I can quickly and repeatable test it ahead of time. It has saved me a huge amount of time and headaches with issues that would have only come up in-game later. It only works as long as I manually run the tests before releasing code. I want unit testing/automation testing to become a more known and practiced topic because it has saved me a lot during outages. This is more difficult without being able to do what is expected with many other industry testing tools.
Throwing my weight behind this as well. I’m the primary code maintainer of Roblox’s fastest-growing UI library, with over 300 stars on GitHub at the time of writing, used by multiple top games such as Roverse and Lua Learning. Developers quite literally depend on my product functioning reliably, and to ensure those standards are met, I have tried to move towards unit testing. Alas, it’s spent more time broken than functioning, and that’s partly because Roblox provides zero support or functionality for anything remotely close to what we need as developers to test our products.
Roblox has command-line tooling available internally that’d more than solve these problems. Is it so hard to give those same tools to us developers, so we can actually build anything serious at all?
I agree with the sentiment expressed in this feature request. The inability to adopt an industry-standard unit testing workflow due to the fragility of the Studio authentication does present a challenge for Roblox developers. The complex setups and frequent breakages with Studio updates hinder the ability to establish a consistent testing process.
In the current state, I find myself resorting to using a VPN to work around the Studio authentication. This is necessary to prevent my security cookie from being invalidated by guaranteeing that my IP matches what is expected before making any Roblox requests. However this has many complications on its own.
With Roblox’s recent acknowledgement of supporting external source control and workflows in the future, I think it is crucial that Roblox takes a step in finding a way to support our development process.
And please do not announce a “Open Cloud Testing Service”… that is not what we want. We just need a way to consistently test our code in the Studio without having to hassle with Studio authentication.
Do you have a unit test workflow that’s currently working? I’d love to get more details! I was using the VPN trick myself but it stopped working after a while.
Please, words cannot express how useful this would be. Unit tests help find critical flaws so they don’t make their way into production. So far the only testing framework I can find only installs through rojo which is an absolute hassle.
It’s currently on the roadmap and slated to release by the end of Q4 2024 and I see this being a priority for Roblox to release, although delays could occur, and it’s only going to be scripting for a while. Probably in late 2025.
I would like to add, Roblox should expose VirtualUser and VirtualInputManager to developers on Studio, this would make it a lot easier to mock and test user interactions