Class TestSequence
java.lang.Object
com.sun.ts.tests.common.webclient.TestSequence
- All Implemented Interfaces:
TestCase
This class represents a logic sequence for executing a series of test cases in a specific order. In this case, the
execution order will be the same order that the test cases were added to the sequence.
The
TestSequence
has the added benefit of managing state between the test invocations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTestCase
(String identifier, TestCase cs) Adds a test case to the sequence denoted by a unique identifier.void
enableStateManagement
(boolean value) enableStateManagement
, when enabled, will cause the test sequence to manage state between test case invocations.void
execute()
Executes the test sequence.getName()
Returns the name of this TestSequence.getState()
Returns the state of the sequence.boolean
Returns a value indicating whether state management is enabled or not.void
removeTestCase
(String identifier) Removes a test case from the sequence.void
Sets the name of this TestSequence.void
Sets the initial state for the test sequence to use when invoking test cases.
-
Constructor Details
-
TestSequence
public TestSequence()Creates a new instance of TestSequence
-
-
Method Details
-
execute
Executes the test sequence.- Specified by:
execute
in interfaceTestCase
- Throws:
TestFailureException
- if any test in the sequence fails.
-
enableStateManagement
public void enableStateManagement(boolean value) enableStateManagement
, when enabled, will cause the test sequence to manage state between test case invocations. By default, a test sequence will not manage state.- Parameters:
value
- a value of true enables session management.
-
isStateManagementEnabled
public boolean isStateManagementEnabled()Returns a value indicating whether state management is enabled or not.- Returns:
- boolean value indicating state management status
-
addTestCase
Adds a test case to the sequence denoted by a unique identifier.- Parameters:
identifier
- for this test casecs
- the test case
-
removeTestCase
Removes a test case from the sequence.- Parameters:
identifier
-
-
setName
Sets the name of this TestSequence. If not set, the default value is "DEFAULT". -
getName
Returns the name of this TestSequence. -
setState
Sets the initial state for the test sequence to use when invoking test cases. -
getState
Returns the state of the sequence. Note: This value can differ depending on when it has been called in relation to when execute has been called.
-