|
|
Log In | Not a Member? |
Contact ADC |
|
ADC Home > Reference Library > Reference > Tools > Xcode > CPlusTest Reference
|
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.
addObserver |
Adds a TestObserver to a TestRun.
public
virtual void addObserver( TestObserver *observer);
observerAdds 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.
public
virtual void failedTest( Test& test, const TestFailure& failure);
testtestFailureInforms 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);
observerRemoves 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.
public
virtual void startedTest( Test& test);
testInforms 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.
public
virtual void startedTestSuite( TestSuite& testSuite);
testSuiteInforms 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.
public
virtual void stoppedTest( Test& test);
testInforms 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.
public
virtual void stoppedTestSuite( TestSuite& testSuite);
testSuiteInforms 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.
|