Class
TestService
Service
A service used by Roblox to run controlled tests of the engine. It is available for developers to use, to a limited degree.
TestService is a service used by Roblox internally to run analytical tests
on the engine.
Scripts that are executed inside of TestService (via
TestService:RunAsync()) have access to special macros that directly
invoke functions under the service. Macros are essentially substitutions for
large blocks of code that shouldn't need to be rewritten each time you want to
call them.
RBX_CHECK#
This macro does tests with calls to the TestService:Check() function.
| Macro | Test Condition |
|---|---|
RBX_CHECK(cond) |
cond == true |
RBX_CHECK_MESSAGE(cond, failMsg) |
cond == true |
RBX_CHECK_THROW(CODE) |
pcall(function() CODE end) == false |
RBX_CHECK_NO_THROW(CODE) |
pcall(function() CODE end) == true |
RBX_CHECK_EQUAL(a, b) |
a == b |
RBX_CHECK_NE(a, b) |
a ~= b |
RBX_CHECK_GE(a, b) |
a >= b |
RBX_CHECK_LE(a, b) |
a <= b |
RBX_CHECK_GT(a, b) |
a > b |
RBX_CHECK_LT(a, b) |
a < b |