Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to use TestService better?

Asked by
blowup999 659 Moderation Voter
1 year ago
Edited 1 year ago

Never really used tests, so I figured I might as well start.

Easiest way to run tests seemed to be to go into CommandBar and call game:GetService("TestService"):Run()

This works great, except then I'll change the script as the tests fail and the next time I call TestService:Run() it will still use the old script instead of the new script, even after committing the changes. I then have to restart studio for it to refresh any scripts not directly parented to TestService (ModuleScripts required by the Tests).

Is there an easier way to run this? Ideally I wouldn't have to run a game instance.

0
Why are you using it anyways? It doesn't have benefits to Developers, only Roblox. T3_MasterGamer 2189 — 1y
0
If you have 1000 tests running, and 50 of them error, putting tests in-line in roblox code will make you only see the first one and have it error right there, so you have no sense of the magnitude of failure or correlations. Also, since it's meant for Unit Testing, I don't have to load the entire game, making it so I can get test results instantly instead of in 10-15 seconds. blowup999 659 — 1y
0
Also, it's just nicer to have something that's not in a folder in ServerScriptService or somewhere I have to call all the modules only when I'm in a Testing mode blowup999 659 — 1y
0
Also, it does have methods that we can call as Developers which they could have kept as private if they wanted it to only be used as roblox internal. blowup999 659 — 1y

1 answer

Log in to vote
0
Answered by
blowup999 659 Moderation Voter
1 year ago

https://devforum.roblox.com/t/how-to-use-testservice-better/2229565/2

Ad

Answer this question