TestServiceクラス

クラスサービス(game:GetService("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.

クラスの関係

受け継いでいるクラス:Object → Instance → TestService

プロパティ(12)

名前と書き方説明
AutoRuns
TestService.AutoRuns: boolean
If set to true, the game will start running when the service's Class.TestService:RunAsync() method is called.
Description
TestService.Description: string
A description of the test being executed.
ErrorCount
TestService.ErrorCount: int
Measures how many errors have been recorded in the test session.
ExecuteWithStudioRun
TestService.ExecuteWithStudioRun: boolean
When set to true, TestService will be executed when using the **Run** action in Roblox Studio.
IsPhysicsEnvironmentalThrottled
TestService.IsPhysicsEnvironmentalThrottled: boolean
Sets whether or not the physics environment should be throttled while running this test.
IsSleepAllowed
TestService.IsSleepAllowed: boolean
Sets whether or not physics objects will be allowed to fall asleep while the test simulation is running.
NumberOfPlayers
TestService.NumberOfPlayers: int
The number of players expected in this test, if any.
SimulateSecondsLag
TestService.SimulateSecondsLag: double
Sets a specific amount of additional latency experienced by players during the test session.
TestCount
TestService.TestCount: int
Measures how many test calls have been recorded in the test session.
ThrottlePhysicsToRealtime
TestService.ThrottlePhysicsToRealtime: boolean
Sets whether the test should be throttled to simulate time according to real world time or as fast as possible.
Timeout
TestService.Timeout: double
The maximum amount of time that tests are allowed to run for.
WarnCount
TestService.WarnCount: int
Measures how many warning calls have been recorded in the test session.

メソッド(11)

名前と書き方説明
Check
TestService:Check(condition: boolean, description: string, source: Instance, line: int): ()
Prints result of a condition to the output.
Checkpoint
TestService:Checkpoint(text: string, source: Instance, line: int): ()
Prints Test checkpoint: followed by a string to the output in blue text.
Done
TestService:Done(): ()
Prints Testing Done to the output in blue text.
Error
TestService:Error(description: string, source: Instance, line: int): ()
Prints a red error message to the output, prefixed by TestService: .
Fail
TestService:Fail(description: string, source: Instance, line: int): ()
Indicates a fatal error in a TestService run.
isFeatureEnabled
TestService:isFeatureEnabled(name: string): boolean
Returns whether the named feature identified by name is currently enabled.
Message
TestService:Message(text: string, source: Instance, line: int): ()
Prints TestService: followed by a string to the output in blue text.
Require
TestService:Require(condition: boolean, description: string, source: Instance, line: int): ()
Prints whether a condition is true along with a description string.
RunAsync
TestService:RunAsync(): ()
Runs scripts which are parented to TestService.
ScopeTime
TestService:ScopeTime(): Dictionary
Returns a dictionary of per-scope physics simulation timings for performance testing.
Warn
TestService:Warn(condition: boolean, description: string, source: Instance, line: int): ()
Prints if a condition is true, otherwise prints a warning.

イベント(2)

名前と書き方説明
ServerCollectConditionalResult
TestService.ServerCollectConditionalResult(condition: boolean, text: string, script: Instance, line: int)
Fires when the server should collect a conditional test result.
ServerCollectResult
TestService.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)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(TestService)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む