As a Roblox developer, it is currently quite difficult to write tests for plugins that run in CI. The Luau execution endpoints that let you run code in Roblox’s engine using open cloud would be ideal for this, but unfortunately it is not a good fit for Roblox plugins. This is because Studio’s environment is different than that of a game server in several key ways, and so it’s not possible for code that runs in Studio to run in a normal server.
Earlier today, I tried to get the tests for Rojo’s plugins running in CI because we currently do not have them running automatically… Which means they really don’t get run except whenever someone remembers. Ideally, we would just run them automatically, so I wrote some code to do just that. Happily, it worked… but it revealed that we cannot actually use it without modifying plugin code.
Right now, we are running into trouble because a few services we use don’t exist in a normal server:
We also run into trouble because these scripts are being ran as normal scripts rather than as a plugin:
We can fix these issues, but it is a hindrance and requires modifying our code so that tests can run in CI when we can run them locally just fine. I want Roblox to instead provide us an environment where this code could run as if it was in Studio and not error.
If Roblox were to add an environment that mimicked Roblox Studio to the open cloud Luau execution endpoint, it would improve my life as a developer because I wouldn’t have to code around running code with these endpoints, and I could instead just focus on improving the plugin.