TestResult
IntroductionRuns test cases and collects the results. Member Functions
addErrorRegisters the fact that the given test raised an error and notifies the observers. on addError( aTestCase, message) ParametersaddFailureRegisters the fact that the given test has failed and notifies the observers. on addFailure( aTestCase, message) ParametersaddObserverMakes the given object an observer of TestResult. on addObserver( anObject) ParametersDiscussionObservers of TestResult are sent notifications whenever certain events occur, like starting a test, completing a test, etc An observer should be an object that inherits from Observer, or at least conforms to its interface. addSkipRegisters the fact that the given test was skipped and notifies the observers. on addSkip( aTestCase, message) ParametersaddSuccessRegisters the fact that the given test has succeeded and notifies the observers. on addSuccess( aTestCase) ParametersassertionCountReturns the total number of successful assertions. on assertionCount() errorCountReturns the number of tests that generated an error. on errorCount() failureCountReturns the number of failed tests. on failureCount() hasPassedReturns true if and only if the test suite completes successfully, that is, without errors or failures. on hasPassed() notifySends the given event to all the observers. on notify( anEvent) ParameterspassCountReturns the number of successful tests. on passCount() runCountReturns the number of tests run. on runCount() runSecondsReturns the time spent to run the test suite, in seconds. on runSeconds() runTestRuns the given test case or test suite. on runTest( aTest) ParametersskipCountReturns the number of skipped test. on skipCount() startTestSets the start time of the test and notifies the observers. on startTest() startTestCaseNotifies the observers that the given test has started. on startTestCase( aTestCase) ParametersstopTestSets the end time of the test and notifies the observers. on stopTest() visitTestCaseRuns a test case and collects results. on visitTestCase( aTestCase) ParametersMember Data
observersAn observer will be notified on visiting progress. property observers : {} |