INSTANCE ... END INSTANCE

System Testing Test Script Language.

Syntax

INSTANCE <instance>{[, <instance>]}:

END INSTANCE

Description

An INSTANCE ... END INSTANCE block allows you to specify associated declarations or the instructions.

When the INSTANCE ... END INSTANCE block is located before the top-level scenarios, it gives global declarations to the test script for all the specified instances.

At the block or nested scenario level, it gives instructions or local declarations to the wrapping block or scenario.

You may not nest instance blocks.

You cannot mix declarations and instructions in the same instance block.

Instance blocks containing instructions follow instance blocks containing declarations.

Examples

HEADER "DEMO SOCKET", $VERSION, "2.4"

DECLARE_INSTANCE client, server

INSTANCE server:

#static int var_c_time ;

END INSTANCE

INITIALIZATION

INSTANCE server:

var_c_time = 0;

END INSTANCE

END INITIALIZATION

SCENARIO Principal

...

INSTANCE client:

#int connectStatus ;

END INSTANCE

...

INSTANCE server:

var_c_time = TIME(globalTime);

END INSTANCE

END SCENARIO