エンジンクラス
StudioTestService
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
プロパティ
方法
AddPlayers(numPlayers: number):() |
EndTest(value: Variant):() |
ExecuteMultiplayerTestAsync(numPlayers: number,args: Variant):Variant |
ExecutePlayModeAsync(args: Variant):Variant |
ExecuteRunModeAsync(args: Variant):Variant |
GetTestArgs():Variant |
LeaveTest():() |
APIリファレンス
プロパティ
方法
AddPlayers
CanLeaveTest
EndTest
StudioTestService:EndTest(value:Variant):()
パラメータ
value:Variant |
戻り値
()
コードサンプル
エンドテストの例
local StudioTestService = game:GetService("StudioTestService")
-- サーバー側のロジックがここで実行され、プレイヤーを待ち、アサーションを実行します。
StudioTestService:EndTest("成功!")ExecuteMultiplayerTestAsync
パラメータ
args:Variant |
戻り値
Variant
コードサンプル
マルチプレイヤーテストの実行サンプル
local StudioTestService = game:GetService("StudioTestService")
local result = StudioTestService:ExecuteMultiplayerTestAsync(4, "LobbySpawnTest")
assert(result == "成功です!")
print("テスト終了:", result)ExecutePlayModeAsync
StudioTestService:ExecutePlayModeAsync(args:Variant):Variant
パラメータ
args:Variant |
戻り値
Variant
ExecuteRunModeAsync
StudioTestService:ExecuteRunModeAsync(args:Variant):Variant
パラメータ
args:Variant |
戻り値
Variant
GetTestArgs
StudioTestService:GetTestArgs():Variant
戻り値
Variant
コードサンプル
テスト引数の取得例
local StudioTestService = game:GetService("StudioTestService")
local args = StudioTestService:GetTestArgs()
print("受信した引数:", args)LeaveTest
StudioTestService:LeaveTest():()
戻り値
()