TestService
Runs automated place tests and provides test assertions and input simulation.
- Service
game:GetService("TestService")- Inherits
- Instance
- Replication
- Never
Behavior
TestService runs automated place tests and provides test assertions and input simulation.
Summary
The number of assertions recorded by the test run.
The number of failed assertions in the test run.
The TestInput interface used to simulate input.
Whether an automated test run is active.
Records a test assertion and whether it passed.
Records a failed test assertion.
Finishes the active test run.
Returns this instance if it is an ExecutionGroup.
Returns the test run's assertion and failure summary.
Fires when a test assertion is recorded.
Fires when the test run finishes.
Properties
Checks
TestService.Checks: number = 0The number of assertions recorded by the test run.
Failures
TestService.Failures: number = 0The number of failed assertions in the test run.
Input
TestService.Input: TestInput = nilThe TestInput interface used to simulate input.
Running
TestService.Running: boolean = trueWhether an automated test run is active.
Methods
Check
TestService:Check(ok: boolean, description: string): booleanRecords a test assertion and whether it passed.
Fail
TestService:Fail(description: string): ()Records a failed test assertion.
Finish
TestService:Finish(): TestSummaryFinishes the active test run.
GetExecutionGroup
TestService:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
Summary
TestService:Summary(): TestSummaryReturns the test run's assertion and failure summary.
Events
Checked
TestService.Checked: RBXScriptSignalFires when a test assertion is recorded.
Finished
TestService.Finished: RBXScriptSignalFires when the test run finishes.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying