The UnitRunner class serves two main purposes:
The UnitRunner is an ActiveX control that can be embedded in a test project form. By adding instances of the TestContainers included in the test project, the user can select which test cases to run. The user can choose to run all test cases from all TestContainers, all test cases in a single TestContainer or a single test case.
When the UnitRunner is instructed to run it creates a TestSuite from the selected test case(s) and executes it. It can executed the test suite using a supplied TestResult object -- or it will create it's own TestResult if none is specified. The results of the tests are displayed in the grid as the test cases run. In accordance with standard unit testing guidelines, only failures and errors are reported. If nothing is reported for a test case, it is assumed that the test case executed successfully.
The progress bar reports the number of test cases that have been executed. The progress bar will remain green as long as no errors or failures have been encountered while executing the test cases. If an error or failure has occurred, the progress bar will turn from green to red. Unit tests are designed so that all tests should run successfully before the code is released. The green progress bar is used as an indication that all tests have passed successfully.
|AddTestContainer||Public Function AddTestContainer(oTestContainer As ITestContainer)|
|Reset||Public Sub Reset()|
|Run||Public Sub Run(Optional oTestResult As TestResult)|
|SetDefaultTestContainer||Public Sub SetDefaultTestContainer(oTestContainer As ITestContainer)|
|TestResult||Public Property Get TestResult() As TestResult
Public Property Set TestResult(oTestResult As TestResult)
|TestSuite||Public Property Get TestSuite() As ITest|