This page contains a technical explanation about how Stryker works underneath. It is a great place to start for new people eager to contribute to the Stryker project. Of course you are free to read it for entertaining purposes as well. It is still a work in progress. Feedback is welcome! Please drop a line on our gitter to let us know how to improve.
Jump right to a section:
Sequence diagrams are rendered from clear text using sdedit
High over, the Stryker life cycle looks like this:
Let's take a look at the sequence diagram.
Next, we'll look at each step in more detail.
The initial test run process runs for these reasons:
This is what happens:
As you can see first the input files are transpiled using the configured transpilers.
This process is done entirely in-memory for performance reasons.
Next, the transpiled output is used to configure a
Sandbox. This in turn will copy the transpiled files to a
a sub-folder in the .stryker-temp directory.
See the Run test sequence diagram for more details on how exactly the Sandbox interacts with the test runner.
The mutation test process is responsible for:
Because this process is the most time consuming, it tries to do this as efficient as possible:
Without further ado:
The running of test(s) inside a test runner is done in both the initial test run process
and the mutation test process. It is implemented as a decorator pattern,
each new decorator adding a small bit of functionality. The most important one is the
It is responsible for running the inside a child process. This allows for a test runner to be killed if it is hanging in an infinite loop because
of a stray mutant.