Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class TestGroup

    Object
       |
       +--TestGroup

class 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.

Defined in TestGroup.js

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

### marker

    Object marker

### name

    Object name

### parameter

    Object parameter

Constructor Detail

### TestGroup

    TestGroup(<String> name, <Object> parameter)

Create a test group object containing test cases.

Parameters:

`name` - the name of the test group

`parameter` - the parameter object for this group of tests

Method Detail

### assertEquals

    void assertEquals(<Any> first, <Any> second, <String> message)

Verify that the given values are equal. Throw an exception if not.

Parameters:

`first` - the first argument

`second` - the second argument

`message` - the message to log in case result is false

### assertTrue

    void assertTrue(<Boolean> result, <String> message)

Verify that the given assertion evaluates to true. Throw an exception if result is false.

Parameters:

`result` - true if assertion is valid

`message` - the message to log in case result is false

### getName

    String getName()

Returns the name of test group.

Returns:

the name of the test group

### getTestCase

    Function getTestCase(<String> name)

Returns a specific test case function.

Parameters:

`name` - the test case name

Returns:

the test case method

### getTestCaseNames

    String[] getTestCaseNames()

Returns a list of tests as sorted array of test case names.

Returns:

the sorted array of test case names

### getUsedTestProceduresForTestCase

    String[] getUsedTestProceduresForTestCase(name)

Returns a list of test procedure names referenced by a test case.

Parameters:

`test` - case name

Returns:

a list of test procedure names or undefined

### log

    void log(<String> message)

Log a text message.

Parameters:

`message` - the message to add to the log

### run

    void run(<TestRunner> runner)

Runs all tests in a test group.

This method can be used to run a test group without a test runner. In that case leave the runner argument empty or null.

Parameters:

`runner` - the test runner to report progress or undefined or null

### runTestCase

    void runTestCase(<String> casename, runner)

Run a single test in a test group, optionally using a test runner.

Parameters:

`casename` - the name of the test case

`the` - test runner object or undefined or null

### runTestProcedure

    TestProcedure runTestProcedure(<String> name, <Object> param)

Run a named test procedure.

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.

Parameters:

`name` - the test procedure name

`param` - the parameter object to pass to the execution of the test procedure

Returns:

the test procedure object

### setMarker

    void setMarker(<String> marker)

Sets a marker used to identify a context in which an assertion failed.

A context can be a certain iteration or group of assertions. A marker allows to further identify the area of a problem.

Parameters:

`marker` - the marker to set

### setUp

    void setUp()

Setup method called before invoking each individual test case.

### tearDown

    void tearDown()

Teardown method called after invocation of a test case.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Mon Feb 23 11:18:44 2026