IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Engine.Runners.MasterTestRunner Class Reference
+ Inheritance diagram for NUnit.Engine.Runners.MasterTestRunner:
+ Collaboration diagram for NUnit.Engine.Runners.MasterTestRunner:

Public Member Functions

 MasterTestRunner (IServiceLocator services, TestPackage package)
 
override void UnloadPackage ()
 Unload any loaded TestPackage. More...
 
override void StopRun (bool force)
 Cancel the ongoing test run. If no test is running, the call is ignored. More...
 
- Public Member Functions inherited from NUnit.Engine.Runners.AbstractTestRunner
 AbstractTestRunner (IServiceLocator services, TestPackage package)
 
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 ()
 
- Public Member Functions inherited from NUnit.Engine.ITestRunner
void Unload ()
 Unload any loaded TestPackage. If none is loaded, the call is ignored. More...
 
int CountTestCases (TestFilter filter)
 Count the test cases that would be run under the specified filter. More...
 

Protected Member Functions

override TestEngineResult ExploreTests (TestFilter filter)
 Explore a loaded TestPackage and return information about the tests found. More...
 
override TestEngineResult LoadPackage ()
 Load a TestPackage for possible execution More...
 
override int CountTests (TestFilter filter)
 Count the test cases that would be run under the specified filter. More...
 
override TestEngineResult RunTests (ITestEventListener listener, TestFilter filter)
 Run the tests in the loaded TestPackage and return a test result. The tests are run synchronously and the listener interface is notified as it progresses. More...
 
override void Dispose (bool disposing)
 Dispose of this object. More...
 
- Protected Member Functions inherited from NUnit.Engine.Runners.AbstractTestRunner
virtual TestEngineResult ReloadPackage ()
 Reload the currently loaded test package. Overridden in derived classes to take any additional action. 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...
 
bool IsProjectPackage (TestPackage package)
 

Properties

bool IsTestRunning [get, private set]
 
- Properties inherited from NUnit.Engine.Runners.AbstractTestRunner
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...
 
- Properties inherited from NUnit.Engine.ITestRunner
bool IsTestRunning [get]
 Get a flag indicating whether a test is running More...
 

Private Member Functions

XmlNode ITestRunner. Load ()
 Load a TestPackage for possible execution. The explicit implementation returns an ITestEngineResult for consumption by clients. More...
 
XmlNode ITestRunner. Reload ()
 Reload the currently loaded test jpackage. More...
 
XmlNode ITestRunner. Run (ITestEventListener listener, TestFilter filter)
 Run the tests in a loaded TestPackage. The explicit implementation returns an ITestEngineResult for use by external clients. More...
 
ITestRun ITestRunner. 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...
 
XmlNode ITestRunner. Explore (TestFilter filter)
 Explore a loaded TestPackage and return information about the tests found. More...
 
void ValidatePackageSettings ()
 

Static Private Member Functions

static void InsertCommandLineElement (XmlNode resultNode)
 
static void InsertSettingsElement (XmlNode resultNode, IDictionary< string, object > settings)
 
static void InsertFilterElement (XmlNode resultNode, TestFilter filter)
 

Private Attributes

ITestEngineRunner _realRunner
 

Additional Inherited Members

- Protected Attributes inherited from NUnit.Engine.Runners.AbstractTestRunner
const string TEST_RUN_ELEMENT = "test-run"
 
bool _disposed = false
 

Constructor & Destructor Documentation

NUnit.Engine.Runners.MasterTestRunner.MasterTestRunner ( IServiceLocator  services,
TestPackage  package 
)
inline

Member Function Documentation

override TestEngineResult NUnit.Engine.Runners.MasterTestRunner.ExploreTests ( TestFilter  filter)
inlineprotectedvirtual

Explore a loaded TestPackage and return information about the tests found.

Parameters
filterA TestFilter used to select tests
Returns
A TestEngineResult.

Implements NUnit.Engine.Runners.AbstractTestRunner.

References NUnit.Engine.ITestEngineRunner.Explore(), NUnit.Engine.TestPackage.FullName, and NUnit.Engine.TestPackage.Name.

override TestEngineResult NUnit.Engine.Runners.MasterTestRunner.LoadPackage ( )
inlineprotectedvirtual
override void NUnit.Engine.Runners.MasterTestRunner.UnloadPackage ( )
inlinevirtual
override int NUnit.Engine.Runners.MasterTestRunner.CountTests ( TestFilter  filter)
inlineprotectedvirtual

Count the test cases that would be run under the specified filter.

Parameters
filterA TestFilter
Returns
The count of test cases

Implements NUnit.Engine.Runners.AbstractTestRunner.

References NUnit.Engine.ITestEngineRunner.CountTestCases().

override TestEngineResult NUnit.Engine.Runners.MasterTestRunner.RunTests ( ITestEventListener  listener,
TestFilter  filter 
)
inlineprotectedvirtual

Run the tests in the loaded TestPackage and return a test result. The tests are run synchronously and the listener interface is notified as it progresses.

Parameters
listenerAn ITestEventHandler to receive events
filterA TestFilter used to select tests
Returns
A TestEngineResult giving the result of the test execution

Implements NUnit.Engine.Runners.AbstractTestRunner.

References NUnit.Engine.TestPackage.FullName, NUnit.Engine.TestPackage.Name, NUnit.Engine.ITestEventListener.OnTestEvent(), NUnit.Engine.ITestEngineRunner.Run(), and NUnit.Engine.TestEngineResult.Xml.

override void NUnit.Engine.Runners.MasterTestRunner.StopRun ( bool  force)
inlinevirtual

Cancel the ongoing test run. If no test is running, the call is ignored.

Parameters
forceIf true, cancel any ongoing test threads, otherwise wait for them to complete.

Implements NUnit.Engine.Runners.AbstractTestRunner.

References NUnit.Engine.ITestEngineRunner.StopRun().

override void NUnit.Engine.Runners.MasterTestRunner.Dispose ( bool  disposing)
inlineprotectedvirtual

Dispose of this object.

Reimplemented from NUnit.Engine.Runners.AbstractTestRunner.

XmlNode ITestRunner. NUnit.Engine.Runners.MasterTestRunner.Load ( )
inlineprivate

Load a TestPackage for possible execution. The explicit implementation returns an ITestEngineResult for consumption by clients.

Returns
An XmlNode representing the loaded assembly.

Implements NUnit.Engine.ITestRunner.

XmlNode ITestRunner. NUnit.Engine.Runners.MasterTestRunner.Reload ( )
inlineprivate

Reload the currently loaded test jpackage.

Returns
An XmlNode representing the loaded package
Exceptions
InvalidOperationExceptionIf no package has been loaded

Implements NUnit.Engine.ITestRunner.

XmlNode ITestRunner. NUnit.Engine.Runners.MasterTestRunner.Run ( ITestEventListener  listener,
TestFilter  filter 
)
inlineprivate

Run the tests in a loaded TestPackage. The explicit implementation returns an ITestEngineResult for use by external clients.

Parameters
listenerAn ITestEventHandler to receive events
filterA TestFilter used to select tests
Returns
An XmlNode giving the result of the test execution

Implements NUnit.Engine.ITestRunner.

ITestRun ITestRunner. NUnit.Engine.Runners.MasterTestRunner.RunAsync ( ITestEventListener  listener,
TestFilter  filter 
)
inlineprivate

Start a run of the tests in the loaded TestPackage. The tests are run asynchronously and the listener interface is notified as it progresses.

Parameters
listenerThe listener that is notified as the run progresses
filterA TestFilter used to select tests
Returns

Implements NUnit.Engine.ITestRunner.

XmlNode ITestRunner. NUnit.Engine.Runners.MasterTestRunner.Explore ( TestFilter  filter)
inlineprivate

Explore a loaded TestPackage and return information about the tests found.

Parameters
filterA TestFilter used to select tests
Returns
An XmlNode representing the tests found.

Implements NUnit.Engine.ITestRunner.

static void NUnit.Engine.Runners.MasterTestRunner.InsertCommandLineElement ( XmlNode  resultNode)
inlinestaticprivate
static void NUnit.Engine.Runners.MasterTestRunner.InsertSettingsElement ( XmlNode  resultNode,
IDictionary< string, object >  settings 
)
inlinestaticprivate
static void NUnit.Engine.Runners.MasterTestRunner.InsertFilterElement ( XmlNode  resultNode,
TestFilter  filter 
)
inlinestaticprivate

Member Data Documentation

ITestEngineRunner NUnit.Engine.Runners.MasterTestRunner._realRunner
private

Property Documentation

bool NUnit.Engine.Runners.MasterTestRunner.IsTestRunning
getprivate set

The documentation for this class was generated from the following file: