|
|
TestRun |
| Declared In: |
Class that represents the execution of one or more unit tests.
A TestRun represents the execution of one or more unit tests, and records success and failure information about those tests. It can have any number of TestObservers attached, which it also informs of test progress for the purposes of logging and reporting.
Adds a TestObserver to a TestRun.
Informs the TestRun that the given Test has failed.
Gets the number of Tests that failed.
Removes a TestObserver from a TestRun.
Gets the number of Tests run.
Informs the TestRun that the given Test has started.
Informs the TestRun that the given TestSuite has started.
Informs the TestRun that the given Test has completed. A Test either completes or fails, never both.
Informs the TestRun that the given TestSuite has completed.
Constructor for the TestRun class.
Destructor for the TestRun class.
addObserver |
Adds a TestObserver to a TestRun.
public
virtual void addObserver( TestObserver *observer);
observerThe TestObserver to notify of events.
Adds a TestObserver that will be notified of various events during execution of Tests. These events include Test start, Test completion, Test failure, TestSuite start, and TestSuite completion. You should not rely on order of notification of observers.
failedTest |
Informs the TestRun that the given Test has failed.
testThe Test that failed execution.
testFailureInformation about the failure of the Test.
Informs the TestRun that the given Test has failed. The TestRun increments its failure count and passes this information to any observers. A Test either completes or fails, never both.
failureCount |
Gets the number of Tests that failed.
public
virtual unsigned int failureCount();
Returns the number of Tests that failed so far.
Gets the number of Tests that failed in the current run. TestSuites are not counted. This can be called at any time, it isn't necessary to wait until all test execution has completed.
removeObserver |
Removes a TestObserver from a TestRun.
public
virtual void removeObserver( TestObserver *observer);
observerThe TestObserver to stop notifying of events.
Removes a TestObserver from a TestRun so it will no longer be notified of events occurring during the run.
runCount |
Gets the number of Tests run.
public
virtual unsigned int runCount();
Returns the number of Tests run so far, regardless of their success.
Gets the number of Tests run, regardless of whether they were successful. TestSuites are not counted. This can be called at any time, it isn't necessary to wait until all test execution has completed.
startedTest |
Informs the TestRun that the given Test has started.
testThe Test that started execution.
Informs the TestRun that the given Test has started. The TestRun increments its run count and passes this information to any observers.
startedTestSuite |
Informs the TestRun that the given TestSuite has started.
testSuiteThe TestSuite that started execution.
Informs the TestRun that the given TestSuite has started. The TestRun passes this information to any observers.
stoppedTest |
Informs the TestRun that the given Test has completed. A Test either completes or fails, never both.
testThe Test that completed execution.
Informs the TestRun that the given Test has completed. The TestRun passes this information to any observers. A Test either completes or fails, never both.
stoppedTestSuite |
Informs the TestRun that the given TestSuite has completed.
testSuiteThe TestSuite that started execution.
Informs the TestRun that the given TestSuite has completed. A TestSuite always completes execution. The TestRun passes this information to any observers.
TestRun |
Constructor for the TestRun class.
public
TestRun();
Constructor for the TestRun class. Initializes the TestRun to a run and failure count of zero, and to have no observers.
~TestRun |
Destructor for the TestRun class.
public
virtual ~TestRun();
Destructor for the TestRun class.
Last Updated: 2009-08-12