Informacje o wersji
Edukacja
Klasa silnika
TestService
Usługa

*Ta zawartość została przetłumaczona przy użyciu narzędzi AI (w wersji beta) i może zawierać błędy. Aby wyświetlić tę stronę w języku angielskim, kliknij tutaj.


Podsumowanie
Metody
Check(condition: boolean,description: string,source: Instance,line: number):()
Checkpoint(text: string,source: Instance,line: number):()
Done():()
Error(description: string,source: Instance,line: number):()
Fail(description: string,source: Instance,line: number):()
Message(text: string,source: Instance,line: number):()
RegisterTest(testOptions: Dictionary):TestCase
Require(condition: boolean,description: string,source: Instance,line: number):()
Run():()
Przestarzałe
TakeSnapshot(snapshotname: string,source: Instance):()
Warn(condition: boolean,description: string,source: Instance,line: number):()
Członkowie odziedziczeni

Materiały referencyjne dotyczące interfejsów API
Właściwości
AutoRuns
Odczyt równoległy
TestService.AutoRuns:boolean

Description
Odczyt równoległy
TestService.Description:string

ErrorCount
Tylko do odczytu
Bez replikacji
Odczyt równoległy
TestService.ErrorCount:number

ExecuteWithStudioRun
Odczyt równoległy
TestService.ExecuteWithStudioRun:boolean

Is30FpsThrottleEnabled
Przestarzałe

IsPhysicsEnvironmentalThrottled
Odczyt równoległy
TestService.IsPhysicsEnvironmentalThrottled:boolean

IsSleepAllowed
Odczyt równoległy
TestService.IsSleepAllowed:boolean

NumberOfPlayers
Odczyt równoległy
TestService.NumberOfPlayers:number

SimulateSecondsLag
Odczyt równoległy
TestService.SimulateSecondsLag:number

TestCount
Tylko do odczytu
Bez replikacji
Odczyt równoległy
TestService.TestCount:number

ThrottlePhysicsToRealtime
Odczyt równoległy
TestService.ThrottlePhysicsToRealtime:boolean

Timeout
Odczyt równoległy
TestService.Timeout:number

WarnCount
Tylko do odczytu
Bez replikacji
Odczyt równoległy
TestService.WarnCount:number

Metody
Check
TestService:Check(
condition:boolean, description:string, source:Instance, line:number
):()
Parametry
condition:boolean
description:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Sprawdź
local TestService = game:GetService("TestService")
TestService:Check(false, "przykład")

Checkpoint
TestService:Checkpoint(
text:string, source:Instance, line:number
):()
Parametry
text:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Checkpoint
local TestService = game:GetService("TestService")
TestService:Checkpoint("przykład")

Done
TestService:Done():()
Zwroty
()
Przykłady kodu
TestService:Zrobione
local TestService = game:GetService("TestService")
TestService:Done()

Error
TestService:Error(
description:string, source:Instance, line:number
):()
Parametry
description:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Error
local TestService = game:GetService("TestService")
TestService:Error("to jest błąd")

Fail
TestService:Fail(
description:string, source:Instance, line:number
):()
Parametry
description:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()

isFeatureEnabled
TestService:isFeatureEnabled(name:string):boolean
Parametry
name:string
Zwroty

Message
TestService:Message(
text:string, source:Instance, line:number
):()
Parametry
text:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Wiadomość
local TestService = game:GetService("TestService")
TestService:Message("przykład")

RegisterTest
TestService:RegisterTest(testOptions:Dictionary):TestCase
Parametry
testOptions:Dictionary
Zwroty
TestCase

Require
TestService:Require(
condition:boolean, description:string, source:Instance, line:number
):()
Parametry
condition:boolean
description:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Require
local TestService = game:GetService("TestService")
TestService:Require(false, "example")

Run
Przestarzałe

RunAsync
Wynik
Zabezpieczenia dodatku plug-in
TestService:RunAsync():()
Zwroty
()

ScopeTime
TestService:ScopeTime():Dictionary

TakeSnapshot
TestService:TakeSnapshot(
snapshotname:string, source:Instance
):()
Parametry
snapshotname:string
source:Instance
Wartość domyślna: "nil"
Zwroty
()

Warn
TestService:Warn(
condition:boolean, description:string, source:Instance, line:number
):()
Parametry
condition:boolean
description:string
source:Instance
Wartość domyślna: "nil"
line:number
Wartość domyślna: 0
Zwroty
()
Przykłady kodu
TestService:Warn
local TestService = game:GetService("TestService")
TestService:Warn(false, "ta akcja jest nieprawidłowa")

Zdarzenia
ServerCollectConditionalResult
TestService.ServerCollectConditionalResult(
condition:boolean, text:string, script:Instance, line:number
Parametry
condition:boolean
text:string
script:Instance
line:number

ServerCollectResult
TestService.ServerCollectResult(
text:string, script:Instance, line:number
Parametry
text:string
script:Instance
line:number

©2026 Roblox Corporation. Nazwa Roblox, logo Roblox oraz hasło „Powering Imagination” należą do naszych zarejestrowanych i niezarejestrowanych znaków towarowych na terenie Stanów Zjednoczonych oraz w innych krajach.