Declares an application state.
appstate appstate1() [basedon appstate2] statements
|appstate1||An identifier that specifies the name of the application state being declared.|
|appstate2||Optional: An identifier that specifies an application state upon which to base the definition of appstate1 or none. Statements in appstate2 are executed before those in appstate1 when the application state function is called. If omitted, none is assumed.|
|statements||The 4Test statements that define the application state.|
An application state is typically used to put an application into the state it should be in at the start of a test case.
You can define the application state from scratch or base the definition on another application state, which in turn can be based on another application state, and so on. The base state is the lowest level of application state in this chain of inheritance. The application state DefaultBaseState is predefined for your use by Silk Test Classic.
To associate an application state with a test case, use the appstate keyword when you define the test case. The second example below associates the application state MyAppState, which is based on MyBaseState, with the test case MyTestCase.
appstate MyAppState () basedon MyBaseState //... testcase MyTestCase () appstate MyAppState //...