When you have a script executing via the TestService (ExecuteWithStudioRun) hit an error, it does not display stack traces.
You can repro with the following Script placed in the TestService with ExecuteWithStudioRun set to true.
function foo() error("hello from TestService"); end foo();
For comparison, I also threw this script in the workspace:
function foo() error("hello from Workspace"); end foo();
When hitting the Run button, the result is that the script in TestService prints the error, but doesn’t show a traceback, making debugging a bit harder.
Some other minor issues
Two other things that make the TestService a bad choice for storing your tests are:
- It takes a lot longer for the script to actually run. In the above screenshot, there’s ~3 seconds of delay between the workspace script running & the test service script.
- TestService doesn’t appear to respect the Disabled property on scripts, so if you want to focus your test on just a specific module, you have to move the scripts out of TestService or turn them into giant block comments.