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

## Class TestRunner

    Object
       |
       +--TestRunner

class TestRunner

Class implementing a graphical test runner
Defined in TestRunner.js

Field Summary
`Object` | `name`
`Object` | `testGroupPrototype`
`Object` | `testGroupRunners`
`Object` | `testMapper`
`Object` | `testProcedurePrototype`
`Object` | `testProcedures`
`Object` | `testReport`

Constructor Summary
`TestRunner(<String> name)` Create a test runner using a Smart Card Shell outline for navigation

Method Summary
`void` | `actionListener(<Object> source, <String> actionName)` Event listener for actions selected from context menu
`void` | `addTest(<String> name, <Object> listener)` Add test to test mapper, which maps test unique id to listening object
`void` | `addTestGroup(<TestGroup> testGroup)` Add a test group to the test runner
`void` | `addTestGroupFromXML(<String> file, <Object> parameter)` Create test group from XML file and add to test runner
`void` | `addTestProcedure(<TestProcedure> proc)` Add a test procedure constructor to the list
`void` | `addTestProcedureFromXML(<String> file, <Object> parameter)` Create test procedure from XML file and add to test runner
`void` | `clearResults()` Clear result of last test run
`void` | `collapseAll()` Collapse all test groups
`Object` | `enable(<String> name, <Boolean> state)` Enable or disable test
`void` | `expandAll()` Expand all test groups
`Object` | `getFailedCounter()`
`Object` | `getLog()`
`TestProcedure` | `getTestProcedure(<String> name)` Return constructor of test procedure
`void` | `hasFailed(<String> name, <String> log)` hasFailed Listener
`void` | `hasPassed(<String> name, <String> log)` hasPassed Listener
`boolean` | `isEnabled(<String> name)` isEnabled query from TestGroup runner
`void` | `report(fn)` Write test report
`void` | `run()` Run all test groups
`void` | `setReportDirectory(<String> dir)` Set directory to write reports

Field Detail

### name

    Object name

### testGroupPrototype

    Object testGroupPrototype

### testGroupRunners

    Object testGroupRunners

### testMapper

    Object testMapper

### testProcedurePrototype

    Object testProcedurePrototype

### testProcedures

    Object testProcedures

### testReport

    Object testReport

Constructor Detail

### TestRunner

    TestRunner(<String> name)

Create a test runner using a Smart Card Shell outline for navigation

Parameters:

`name` - the test suite name

Method Detail

### actionListener

    void actionListener(<Object> source, <String> actionName)

Event listener for actions selected from context menu

Parameters:

`source` - the outline node for which the action was invoked

`actionName` - the name of the action selected

### addTest

    void addTest(<String> name, <Object> listener)

Add test to test mapper, which maps test unique id to listening object

Parameters:

`name` - the unique test name

`listener` - the listener object implementing the clearResults(), enable(), isEnabled(), hasPassed() and hasFailed() methods

### addTestGroup

    void addTestGroup(<TestGroup> testGroup)

Add a test group to the test runner

This call will iterate through all test cases and locate used procedures and steps.

Parameters:

`testGroup` - the test group object

### addTestGroupFromXML

    void addTestGroupFromXML(<String> file, <Object> parameter)

Create test group from XML file and add to test runner

Parameters:

`file` - the file name containing the test group

`parameter` - the parameter object

### addTestProcedure

    void addTestProcedure(<TestProcedure> proc)

Add a test procedure constructor to the list

Use the getName() method to obtain the test procedure name

Parameters:

`proc` - the test procedure object

### addTestProcedureFromXML

    void addTestProcedureFromXML(<String> file, <Object> parameter)

Create test procedure from XML file and add to test runner

Parameters:

`file` - the file name containing the test procedure

`parameter` - the parameter object

### clearResults

    void clearResults()

Clear result of last test run

### collapseAll

    void collapseAll()

Collapse all test groups

### enable

    Object enable(<String> name, <Boolean> state)

Enable or disable test

Parameters:

`name` - the unique test name

`state` - the enable / disable state

### expandAll

    void expandAll()

Expand all test groups

### getFailedCounter

    Object getFailedCounter()

### getLog

    Object getLog()

### getTestProcedure

    TestProcedure getTestProcedure(<String> name)

Return constructor of test procedure

Parameters:

`name` - the name of the test procedure

Returns:

the test procedure object

### hasFailed

    void hasFailed(<String> name, <String> log)

hasFailed Listener

Parameters:

`name` - the unique test name

`log` - the test log

### hasPassed

    void hasPassed(<String> name, <String> log)

hasPassed Listener

Parameters:

`name` - the unique test name

`log` - the test log

### isEnabled

    boolean isEnabled(<String> name)

isEnabled query from TestGroup runner

Parameters:

`name` - the unique test name

Returns:

true if the test is enabled

### report

    void report(fn)

Write test report

### run

    void run()

Run all test groups

### setReportDirectory

    void setReportDirectory(<String> dir)

Set directory to write reports

Parameters:

`dir` - the directory to store reports

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 Wed Jan 14 16:42:14 2026