C# Class NBench.Sdk.TestRunner

Executor of tests
Will be created in separated appDomain therefor it have to be marshaled.
Inheritance: System.MarshalByRefObject
显示文件 Open project: petabridge/NBench

Public Properties

Property Type Description
IsMono bool

Public Methods

Method Description
CreateRunner ( AppDomain domain, TestPackage package ) : TestRunner

Creates a new instance of the test runner in the given app domain.

Execute ( ) : TestRunnerResult

Executes the tests

InitializeLifetimeService ( ) : object

Control the lifetime policy for this instance

Run ( TestPackage package ) : TestRunnerResult

Executes the test package.

Creates a new AppDomain and executes the tests.

SetProcessPriority ( bool concurrent ) : void

Initializes the process and thread

TestRunner ( TestPackage package ) : System

Initializes a new instance of the test runner.

Protected Methods

Method Description
CreateOutput ( ) : IBenchmarkOutput

Creates the benchmark output writer

Method Details

CreateOutput() protected method

Creates the benchmark output writer
protected CreateOutput ( ) : IBenchmarkOutput
return IBenchmarkOutput

CreateRunner() public static method

Creates a new instance of the test runner in the given app domain.
public static CreateRunner ( AppDomain domain, TestPackage package ) : TestRunner
domain System.AppDomain The app domain to create the runner into.
package TestPackage The test package to execute.
return TestRunner

Execute() public method

Executes the tests

InitializeLifetimeService() public method

Control the lifetime policy for this instance
public InitializeLifetimeService ( ) : object
return object

Run() public static method

Executes the test package.
Creates a new AppDomain and executes the tests.
public static Run ( TestPackage package ) : TestRunnerResult
package TestPackage The test package to execute.
return TestRunnerResult

SetProcessPriority() public method

Initializes the process and thread
public SetProcessPriority ( bool concurrent ) : void
concurrent bool
return void

TestRunner() public method

Initializes a new instance of the test runner.
public TestRunner ( TestPackage package ) : System
package TestPackage The test package to be executed
return System

Property Details

IsMono public_oe static_oe property

Can't apply some of our optimization tricks if running Mono, due to need for elevated permissions
public static bool IsMono
return bool