# TestService(ロブロックス クラス) > A service used by Roblox to run controlled tests of the engine. It is available for developers to use, to a limited degree. - URL:https://roblox.minecraft-okinawa.com/reference/classes/TestService/ - 公式:https://create.roblox.com/docs/reference/engine/classes/TestService - 受け継いでいるクラス:Instance ## プロパティ - `TestService.AutoRuns: boolean`:If set to true, the game will start running when the service's Class.TestService:RunAsync() method is called. - `TestService.Description: string`:A description of the test being executed. - `TestService.ErrorCount: int`:Measures how many errors have been recorded in the test session. - `TestService.ExecuteWithStudioRun: boolean`:When set to true, TestService will be executed when using the **Run** action in Roblox Studio. - `TestService.IsPhysicsEnvironmentalThrottled: boolean`:Sets whether or not the physics environment should be throttled while running this test. - `TestService.IsSleepAllowed: boolean`:Sets whether or not physics objects will be allowed to fall asleep while the test simulation is running. - `TestService.NumberOfPlayers: int`:The number of players expected in this test, if any. - `TestService.SimulateSecondsLag: double`:Sets a specific amount of additional latency experienced by players during the test session. - `TestService.TestCount: int`:Measures how many test calls have been recorded in the test session. - `TestService.ThrottlePhysicsToRealtime: boolean`:Sets whether the test should be throttled to simulate time according to real world time or as fast as possible. - `TestService.Timeout: double`:The maximum amount of time that tests are allowed to run for. - `TestService.WarnCount: int`:Measures how many warning calls have been recorded in the test session. ## メソッド - `TestService:Check(condition: boolean, description: string, source: Instance, line: int): ()`:Prints result of a condition to the output. - `TestService:Checkpoint(text: string, source: Instance, line: int): ()`:Prints Test checkpoint: followed by a string to the output in blue text. - `TestService:Done(): ()`:Prints Testing Done to the output in blue text. - `TestService:Error(description: string, source: Instance, line: int): ()`:Prints a red error message to the output, prefixed by TestService: . - `TestService:Fail(description: string, source: Instance, line: int): ()`:Indicates a fatal error in a TestService run. - `TestService:isFeatureEnabled(name: string): boolean`:Returns whether the named feature identified by name is currently enabled. - `TestService:Message(text: string, source: Instance, line: int): ()`:Prints TestService: followed by a string to the output in blue text. - `TestService:Require(condition: boolean, description: string, source: Instance, line: int): ()`:Prints whether a condition is true along with a description string. - `TestService:RunAsync(): ()`:Runs scripts which are parented to TestService. - `TestService:ScopeTime(): Dictionary`:Returns a dictionary of per-scope physics simulation timings for performance testing. - `TestService:Warn(condition: boolean, description: string, source: Instance, line: int): ()`:Prints if a condition is true, otherwise prints a warning. ## イベント - `TestService.ServerCollectConditionalResult(condition: boolean, text: string, script: Instance, line: int)`:Fires when the server should collect a conditional test result. - `TestService.ServerCollectResult(text: string, script: Instance, line: int)`:Fires when the server should collect a test result. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)