|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--TestGroup
Abstract base class implementing a group of test cases.
Actual test group objects are derived from this base class.
Each test case is created as a method of this object.
Field Summary | |
Object |
marker
|
Object |
name
|
Object |
parameter
|
Constructor Summary | |
TestGroup(<String> name, <Object> parameter)
Create a test group object containing test cases. |
Method Summary | |
void
|
assertEquals(<Any> first, <Any> second, <String> message)
Verify that the given values are equal. |
void
|
assertTrue(<Boolean> result, <String> message)
Verify that the given assertion evaluates to true. |
String
|
getName()
Returns the name of test group. |
Function
|
getTestCase(<String> name)
Returns a specific test case function. |
String[]
|
getTestCaseNames()
Returns a list of tests as sorted array of test case names. |
String[]
|
getUsedTestProceduresForTestCase(name)
Returns a list of test procedure names referenced by a test case. |
void
|
log(<String> message)
Log a text message. |
void
|
run(<TestRunner> runner)
Runs all tests in a test group. |
void
|
runTestCase(<String> casename, runner)
Run a single test in a test group, optionally using a test runner. |
TestProcedure
|
runTestProcedure(<String> name, <Object> param)
Run a named test procedure. |
void
|
setMarker(<String> marker)
Sets a marker used to identify a context in which an assertion failed. |
void
|
setUp()
Setup method called before invoking each individual test case. |
void
|
tearDown()
Teardown method called after invocation of a test case. |
Field Detail |
Object marker
Object name
Object parameter
Constructor Detail |
TestGroup(<String> name, <Object> parameter)
name
- the name of the test group
parameter
- the parameter object for this group of tests
Method Detail |
void assertEquals(<Any> first, <Any> second, <String> message)
first
- the first argument
second
- the second argument
message
- the message to log in case result is false
void assertTrue(<Boolean> result, <String> message)
result
- true if assertion is valid
message
- the message to log in case result is false
String getName()
Function getTestCase(<String> name)
name
- the test case name
String[] getTestCaseNames()
String[] getUsedTestProceduresForTestCase(name)
test
- case name
void log(<String> message)
message
- the message to add to the log
void run(<TestRunner> runner)
This method can be used to run a test group without a test runner. In that case leave the runner argument empty or null.
runner
- the test runner to report progress or undefined or null
void runTestCase(<String> casename, runner)
casename
- the name of the test case
the
- test runner object or undefined or null
TestProcedure runTestProcedure(<String> name, <Object> param)
This method is called by code in a test case to run a test procedure.
This method uses the test runner to create a new instance of the test procedure object. All test steps in the procedure are executed and the test procedure object is returned to the caller for further processing of test results.
name
- the test procedure name
param
- the parameter object to pass to the execution of the test procedure
void setMarker(<String> marker)
A context can be a certain iteration or group of assertions. A marker allows to further identify the area of a problem.
marker
- the marker to set
void setUp()
void tearDown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |