TestServiceクラス
ひとことで言うと
TestServiceは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。
公式の説明(英語):A service used by Roblox to run controlled tests of the engine. It is available for developers to use, to a limited degree.
クラスの関係
プロパティ(12)
| 名前と書き方 | 説明 |
|---|---|
AutoRunsTestService.AutoRuns: boolean | If set to true, the game will start running when the service's Class.TestService:RunAsync() method is called. |
DescriptionTestService.Description: string | A description of the test being executed. |
ErrorCountTestService.ErrorCount: int | Measures how many errors have been recorded in the test session. |
ExecuteWithStudioRunTestService.ExecuteWithStudioRun: boolean | When set to true, TestService will be executed when using the **Run** action in Roblox Studio. |
IsPhysicsEnvironmentalThrottledTestService.IsPhysicsEnvironmentalThrottled: boolean | Sets whether or not the physics environment should be throttled while running this test. |
IsSleepAllowedTestService.IsSleepAllowed: boolean | Sets whether or not physics objects will be allowed to fall asleep while the test simulation is running. |
NumberOfPlayersTestService.NumberOfPlayers: int | The number of players expected in this test, if any. |
SimulateSecondsLagTestService.SimulateSecondsLag: double | Sets a specific amount of additional latency experienced by players during the test session. |
TestCountTestService.TestCount: int | Measures how many test calls have been recorded in the test session. |
ThrottlePhysicsToRealtimeTestService.ThrottlePhysicsToRealtime: boolean | Sets whether the test should be throttled to simulate time according to real world time or as fast as possible. |
TimeoutTestService.Timeout: double | The maximum amount of time that tests are allowed to run for. |
WarnCountTestService.WarnCount: int | Measures how many warning calls have been recorded in the test session. |
メソッド(11)
| 名前と書き方 | 説明 |
|---|---|
CheckTestService:Check(condition: boolean, description: string, source: Instance, line: int): () | Prints result of a condition to the output. |
CheckpointTestService:Checkpoint(text: string, source: Instance, line: int): () | Prints Test checkpoint: followed by a string to the output in blue text. |
DoneTestService:Done(): () | Prints Testing Done to the output in blue text. |
ErrorTestService:Error(description: string, source: Instance, line: int): () | Prints a red error message to the output, prefixed by TestService: . |
FailTestService:Fail(description: string, source: Instance, line: int): () | Indicates a fatal error in a TestService run. |
isFeatureEnabledTestService:isFeatureEnabled(name: string): boolean | Returns whether the named feature identified by name is currently enabled. |
MessageTestService:Message(text: string, source: Instance, line: int): () | Prints TestService: followed by a string to the output in blue text. |
RequireTestService:Require(condition: boolean, description: string, source: Instance, line: int): () | Prints whether a condition is true along with a description string. |
RunAsyncTestService:RunAsync(): () | Runs scripts which are parented to TestService. |
ScopeTimeTestService:ScopeTime(): Dictionary | Returns a dictionary of per-scope physics simulation timings for performance testing. |
WarnTestService:Warn(condition: boolean, description: string, source: Instance, line: int): () | Prints if a condition is true, otherwise prints a warning. |
イベント(2)
| 名前と書き方 | 説明 |
|---|---|
ServerCollectConditionalResultTestService.ServerCollectConditionalResult(condition: boolean, text: string, script: Instance, line: int) | Fires when the server should collect a conditional test result. |
ServerCollectResultTestService.ServerCollectResult(text: string, script: Instance, line: int) | Fires when the server should collect a test result. |
受け継いでいるメンバー
Instance から受け継いでいるもの(46)
Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged
Object から受け継いでいるもの(4)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(TestService)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。