Skip to content

Scripting API / inspection/tests/TestContainer

inspection/tests/TestContainer

Modules

Module Description
External -

Interfaces

TestContainer

Methods

addDateTimeTest()

addDateTimeTest(testProperties): Promise<void>

Adds a Date/Time test with the given properties to this sub-inspection

Parameters
Parameter Type Description
testProperties DateTimeTestWorkerCreate The properties with which the test will be initialized
Returns

Promise<void>

addProcessTest()

addProcessTest(testProperties): Promise<void>

Adds a Process test with the given properties to this sub-inspection

Parameters
Parameter Type Description
testProperties ProcessTestWorkerCreate The properties with which the test will be initialized
Returns

Promise<void>

addTraceabilityTest()

addTraceabilityTest(testProperties): Promise<void>

Adds a Traceability test with the given properties to this sub-inspection

Parameters
Parameter Type Description
testProperties TraceabilityTestWorkerCreate The properties with which the test will be initialized
Returns

Promise<void>

allTestEvents()

allTestEvents(): AllTestEventsApi

Allows event binding to all tests on this sub-inspection.

Returns

AllTestEventsApi

An object which allows access to test event bindings.

button()

button(scriptId): ButtonTestApi

Allows modification, retrieval, and event binding of an Button test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

ButtonTestApi

An object which allows access to the test methods

dateTime()

dateTime(scriptId): DateTimeTestApi

Allows modification, retrieval, and event binding of a Date/Time test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

DateTimeTestApi

An object which allows access to the test methods

file()

file(scriptId): FileTestApi

Allows modification, retrieval, and event binding of an File test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

FileTestApi

An object which allows access to the test methods

getTests()

getTests(): Promise<TestsInInspectionWorkerGet[]>

Gets a list of tests inside of this test container.

Returns

Promise<TestsInInspectionWorkerGet[]>

A list of all tests, including those in groups, in this container.

input()

input(scriptId): InputTestApi

Allows modification, retrieval, and event binding of an Input test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

InputTestApi

An object which allows access to the test methods

label()

label(scriptId): LabelTestApi

Allows modification, retrieval, and event binding of an Label test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

LabelTestApi

An object which allows access to the test methods

process()

process(scriptId): ProcessTestApi

Allows modification, retrieval, and event binding of a Process test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

ProcessTestApi

An object which allows access to the test methods

removeTest()

removeTest(scriptId, testType?): Promise<void>

Removes a test from the current test container.

Parameters
Parameter Type Description
scriptId string The id of the test to remove.
testType? InspectionTest The type of the test to remove. If not provided, the first test with the given script ID will be removed.
Returns

Promise<void>

traceability()

traceability(scriptId): TraceabilityTestApi

Allows modification, retrieval, and event binding of a Traceability test with the given id.

Parameters
Parameter Type Description
scriptId string Unique id of the test.
Returns

TraceabilityTestApi

An object which allows access to the test methods