Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wxITestRunner Class Reference

The pure abstract interface for all test-runners. More...

#include <ITestRunner.h>

Inheritance diagram for wxITestRunner::

wxTestRunner wxTestRunnerMT List of all members.

Public Methods

virtual void SpawnThreads (wxITest *)=0
 Implementations of test-runners can implement this function to spawn additional threads to run test cases in a multi-threaded envoriment to check for thread saftey. More...

virtual void wxtstdout (const char *psz,...)=0
 Captures textual outputfrom tests. More...

virtual void BeginTestCase (wxITest *pTest)=0
 Called by the test framework before a unit test is run. More...

virtual void EndTestCase (wxITest *pTest)=0
 Called by the test framework after a unit test is run. More...

virtual void OnTestFailure (wxITest *pTest, const char *pszMessage, const char *pszFile, unsigned long nLineNo)=0
 Called by the test framework when a test fails. More...

virtual int GetNumTestsRun ()=0
 Retreives the number of individual test-cases run thus far. More...

virtual int GetNumFailures ()=0
 Retreives the number of failures that have occured thus far. More...


Detailed Description

The pure abstract interface for all test-runners.

This class consists of nothing but pure virtual functions.

Definition at line 21 of file ITestRunner.h.


Member Function Documentation

virtual void wxITestRunner::SpawnThreads wxITest   [pure virtual]
 

Implementations of test-runners can implement this function to spawn additional threads to run test cases in a multi-threaded envoriment to check for thread saftey.

This function is typically called from an a test's 'Run( wxITestRunner* )' function. It should spawn multiple threads and call the test's 'Run( wxITestRunner*, int nThreadId )' function

Parameters:
wxITest  The test currently running.

Reimplemented in wxTestRunner, and wxTestRunnerMT.

virtual void wxITestRunner::wxtstdout const char *    psz,
...   
[pure virtual]
 

Captures textual outputfrom tests.

If tests create any output then it must be identical each time the test is run, as explained below.

The first time a test is run, the test-runner will prompt a user to confirm the correctness of the output. Once test output has been confirmed as correct, the test-runner saves the output for later comparison. Upon subsequent runs of the test, the confirmed output that has been saved is automatically compared against the new output. If the output is not identical then the test is considered to have failed.

Reimplemented in wxTestRunner.

virtual void wxITestRunner::BeginTestCase wxITest   pTest [pure virtual]
 

Called by the test framework before a unit test is run.

This function is overridden in specialized implementation of test-runners to perform specific tasks (e.g., to update the test runner's user interface or write to a log).

Parameters:
pTest  The test that about to run.

Reimplemented in wxTestRunner.

virtual void wxITestRunner::EndTestCase wxITest   pTest [pure virtual]
 

Called by the test framework after a unit test is run.

This function is overridden in specialized implementation of test-runners to perform specific tasks (e.g., to update the test runner's user interface or write to a log).

Parameters:
pTest  The test that just finnished running.

Reimplemented in wxTestRunner.

virtual void wxITestRunner::OnTestFailure wxITest   pTest,
const char *    pszMessage,
const char *    pszFile,
unsigned long    nLineNo
[pure virtual]
 

Called by the test framework when a test fails.

This function is overridden in specialized implementation of test-runners to perform specific tasks (e.g., to update the test runner's user interface or write to a log).

Parameters:
pTest  The test that's currently running.
pszMessage  A human-readable message that describes the failure.
pszFile  The source file in which the failure occured.
nLineNo  The line number at which the failure occured.

Reimplemented in wxTestRunner.

virtual int wxITestRunner::GetNumTestsRun   [pure virtual]
 

Retreives the number of individual test-cases run thus far.

Returns:
The number of individual test-cases run thus far.

Reimplemented in wxTestRunner.

virtual int wxITestRunner::GetNumFailures   [pure virtual]
 

Retreives the number of failures that have occured thus far.

Returns:
The number of faulures that have occured thus far.

Reimplemented in wxTestRunner.


The documentation for this class was generated from the following file:
ThunderCow Software (c) 2001 Marty Saxton, ThunderCow Software. Generated on Sat Nov 17 14:08:32 2001 for wxTest by Doxygen 1.2.11