Class ParallelExecutor
The parallel executors runs tests in a sepparate thread
Methods
| Name | Description |
|---|---|
beginExecution
()
|
Called before all tests were discovered and they are ready to be executed |
endExecution
()
|
Called when there is no more test to be executed |
execute
()
|
Run a particullary test case |
Example
endStep leaves only the test result on the step stack after one step ends
auto old = LifeCycleListeners .instance;
LifeCycleListeners .instance = new LifeCycleListeners;
scope (exit) LifeCycleListeners .instance = old;
auto executor = new ParallelExecutor;
const(TestCase)[] tests = [TestCase("suite1", "test1", delegate() {})];
executor .beginExecution(tests);
auto key = "suite1|test1";
executor .testCases[key] = TestCase(tests[0]);
executor .addTestResult(key);
executor .addStep(key, "some step", Clock .currTime);
executor .endStep(key, "some step", Clock .currTime);
executor .stepStack[key] .length .should .equal(1);