This is a big PR, but this is the implementation of the test execution system.
As an overview:
The TestRun class is the entry point for the execution process.
When Execute is called on the Test Run:
A dependency injection container is built (using Autofac, although the Autofac dependency is not exposed, we have wrapping interfaces/types).
An event pipeline is constructed that allows us to have chained event handlers that can catch issues in subsequent event handlers.
We hand off to a series of execution 'strategies', implemented by:
DefaultRunExecutionStrategy
DefaultFeatureExecutionStrategy
DefaultScenarioExecutionStrategy
DefaultStepCollectionExecutionStrategy
DefaultStepExecutionStrategy.
The strategies implement the behaviour of calling event handlers for each stage of execution, and keep the execution process tidy and testable by splitting out each stage.
Take a look at the tests in EndToEndTests for a set of tests that run the various paths through.
In this set of changes I also added a set of metadata interfaces for the built file elements so we don't leak editable compilation models into the execution phase.
This is a big PR, but this is the implementation of the test execution system.
As an overview:
TestRun
class is the entry point for the execution process.When
Execute
is called on the Test Run:We hand off to a series of execution 'strategies', implemented by:
DefaultRunExecutionStrategy
DefaultFeatureExecutionStrategy
DefaultScenarioExecutionStrategy
DefaultStepCollectionExecutionStrategy
DefaultStepExecutionStrategy
.The strategies implement the behaviour of calling event handlers for each stage of execution, and keep the execution process tidy and testable by splitting out each stage.
Take a look at the tests in
EndToEndTests
for a set of tests that run the various paths through.In this set of changes I also added a set of metadata interfaces for the built file elements so we don't leak editable compilation models into the execution phase.