IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
AbstractTestRunner is the base class for all runners within the NUnit Engine. It implements the ITestRunner interface, which is used by clients of the engine and uses a Template pattern with abstract methods overridden by the derived runners. More...
Public Member Functions | |
AbstractTestRunner (IServiceLocator services, TestPackage package) | |
virtual void | UnloadPackage () |
Unload any loaded TestPackage. Overridden in derived classes to take any necessary action. More... | |
abstract void | StopRun (bool force) |
Cancel the ongoing test run. If no test is running, the call is ignored. More... | |
TestEngineResult | Explore (TestFilter filter) |
Explores the TestPackage and returns information about the tests found. Loads the package if not done previously. More... | |
TestEngineResult | Load () |
Loads the TestPackage for exploration or execution, saving the result. More... | |
TestEngineResult | Reload () |
Reload the currently loaded test package, saving the result. More... | |
void | Unload () |
Unload any loaded TestPackage. More... | |
int | CountTestCases (TestFilter filter) |
Count the test cases that would be run under the specified filter, loading the TestPackage if it is not already loaded. More... | |
TestEngineResult | Run (ITestEventListener listener, TestFilter filter) |
Run the tests in the TestPackage, loading the package if this has not already been done. More... | |
AsyncTestEngineResult | RunAsync (ITestEventListener listener, TestFilter filter) |
Start a run of the tests in the loaded TestPackage. The tests are run asynchronously and the listener interface is notified as it progresses. More... | |
void | StartRun (ITestEventListener listener, TestFilter filter) |
Start a run of the tests in the TestPackage. The tests are run asynchronously and the listener interface is notified as it progresses. Loads the TestPackage if not already loaded. More... | |
void | Dispose () |
Protected Member Functions | |
abstract TestEngineResult | LoadPackage () |
Loads the TestPackage for exploration or execution. More... | |
virtual TestEngineResult | ReloadPackage () |
Reload the currently loaded test package. Overridden in derived classes to take any additional action. More... | |
abstract TestEngineResult | ExploreTests (TestFilter filter) |
Explores a previously loaded TestPackage and returns information about the tests found. More... | |
abstract int | CountTests (TestFilter filter) |
Count the test cases that would be run under the specified filter. More... | |
abstract TestEngineResult | RunTests (ITestEventListener listener, TestFilter filter) |
Run the tests in the loaded TestPackage. More... | |
virtual AsyncTestEngineResult | RunTestsAsync (ITestEventListener listener, TestFilter filter) |
Start a run of the tests in the loaded TestPackage, returning immediately. The tests are run asynchronously and the listener interface is notified as it progresses. More... | |
virtual void | Dispose (bool disposing) |
bool | IsProjectPackage (TestPackage package) |
Protected Attributes | |
const string | TEST_RUN_ELEMENT = "test-run" |
bool | _disposed = false |
Properties | |
IServiceLocator | Services [get, private set] |
Our Service Context More... | |
IProjectService | ProjectService [get, private set] |
ITestRunnerFactory | TestRunnerFactory [get, private set] |
TestPackage | TestPackage [get, set] |
The TestPackage for which this is the runner More... | |
TestEngineResult | LoadResult [get, set] |
The result of the last call to LoadPackage More... | |
bool | IsPackageLoaded [get] |
Gets an indicator of whether the package has been loaded. More... | |
Private Member Functions | |
void | EnsurePackageIsLoaded () |
AbstractTestRunner is the base class for all runners within the NUnit Engine. It implements the ITestRunner interface, which is used by clients of the engine and uses a Template pattern with abstract methods overridden by the derived runners.
|
inline |
|
protectedpure virtual |
Loads the TestPackage for exploration or execution.
Implemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.DirectTestRunner, NUnit.Engine.Runners.AggregatingTestRunner, NUnit.Engine.Runners.MasterTestRunner, and NUnit.Engine.Runners.TestDomainRunner.
|
inlineprotectedvirtual |
Reload the currently loaded test package. Overridden in derived classes to take any additional action.
|
inlinevirtual |
Unload any loaded TestPackage. Overridden in derived classes to take any necessary action.
Reimplemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.AggregatingTestRunner, NUnit.Engine.Runners.MasterTestRunner, and NUnit.Engine.Runners.TestDomainRunner.
|
protectedpure virtual |
Explores a previously loaded TestPackage and returns information about the tests found.
filter | The TestFilter to be used to select tests |
Implemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.DirectTestRunner, NUnit.Engine.Runners.AggregatingTestRunner, and NUnit.Engine.Runners.MasterTestRunner.
|
protectedpure virtual |
Count the test cases that would be run under the specified filter.
filter | A TestFilter |
Implemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.DirectTestRunner, NUnit.Engine.Runners.AggregatingTestRunner, and NUnit.Engine.Runners.MasterTestRunner.
|
protectedpure virtual |
Run the tests in the loaded TestPackage.
listener | An ITestEventHandler to receive events |
filter | A TestFilter used to select tests |
Implemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.DirectTestRunner, NUnit.Engine.Runners.AggregatingTestRunner, and NUnit.Engine.Runners.MasterTestRunner.
|
inlineprotectedvirtual |
Start a run of the tests in the loaded TestPackage, returning immediately. The tests are run asynchronously and the listener interface is notified as it progresses.
listener | An ITestEventHandler to receive events |
filter | A TestFilter used to select tests |
Reimplemented in NUnit.Engine.Runners.ProcessRunner.
|
pure virtual |
Cancel the ongoing test run. If no test is running, the call is ignored.
force | If true, cancel any ongoing test threads, otherwise wait for them to complete. |
Implements NUnit.Engine.ITestEngineRunner.
Implemented in NUnit.Engine.Runners.ProcessRunner, NUnit.Engine.Runners.AggregatingTestRunner, NUnit.Engine.Runners.DirectTestRunner, and NUnit.Engine.Runners.MasterTestRunner.
|
inline |
Explores the TestPackage and returns information about the tests found. Loads the package if not done previously.
filter | The TestFilter to be used to select tests |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Loads the TestPackage for exploration or execution, saving the result.
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Reload the currently loaded test package, saving the result.
InvalidOperationException | If no package has been loaded |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Unload any loaded TestPackage.
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Count the test cases that would be run under the specified filter, loading the TestPackage if it is not already loaded.
filter | A TestFilter |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Run the tests in the TestPackage, loading the package if this has not already been done.
listener | An ITestEventHandler to receive events |
filter | A TestFilter used to select tests |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Start a run of the tests in the loaded TestPackage. The tests are run asynchronously and the listener interface is notified as it progresses.
listener | An ITestEventHandler to receive events |
filter | A TestFilter used to select tests |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
Start a run of the tests in the TestPackage. The tests are run asynchronously and the listener interface is notified as it progresses. Loads the TestPackage if not already loaded.
listener | An ITestEventHandler to receive events |
filter | A TestFilter used to select tests |
Implements NUnit.Engine.ITestEngineRunner.
|
inline |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprivate |
|
protected |
|
protected |
|
getprivate setprotected |
Our Service Context
|
getprivate setprotected |
|
getprivate setprotected |
|
getsetprotected |
The TestPackage for which this is the runner
|
getsetprotected |
The result of the last call to LoadPackage
|
getprotected |
Gets an indicator of whether the package has been loaded.