Improve the project discovery and analysis phase and improve the design of associated classes. Fixes relevant issues along the way
Changes
Project discovery and Solution mode (main changes)
Alignement The general processing is now identical for both modes. The difference is in how individual projects are discovered:
in solution mode, Stryker works with every project of the solution
in project discovery mode, Stryker recursively discovers project, starting with the provide test project(s) and add any project dependencies
Note that other strategies are easy to implement, such as full recursive discovery: testing all projects are referenced (incl. transitively) by a set of test projects.
Project Analysis
Configuration: the user can now specify the desired (project/solution configuration (e.g Release) instead of Stryker peeking the default one.
Multi-target: Stryker respects exact inter project dependencies, including target framework version and target platform
Filtering: SourceProject option works for solution mode too
Platform: Stryker uses the target platform settings (if specified) when running tests.
Resiliency: Stryker retries project analysis when Buildalyzer failed to detect dependency. Stryker considers an analysis as failed if it did not report any source files or any dependencies, disregarding the BuildAlyzer status. MsBuild may report a build as failed if some secondary target fails, on the other hand, BuildAlyzer will report a success while it failed to capture any dependencies.
Logging: Stryker provides MsBuild log for both project and solution mode (with -dev—mode modifier) as well as analysis result details.
Content files: Stryker perform a post build scan of dependencies to identify content files from nugget packages such as ‘MimeTypes’. This is a workaround until BuildAlyzer is able to detect them
CLI
-configuration : new option that allows to specify which configuration to build (Debug, Release…). This should be a solution configuration in ‘solution’ mode.
Misc
compilation phase: compilation stops (and fails) immediately if Stryker is unable to identify any (new) mutation causing errors. Previously it recompiled the same code until the max attempts is reached
initial build: log first build attempt when it fails (Trace level), use dotnet msbuild instead of msbuild.exe on non windows platform
initial build: ensure quotes are applied for space containing path in every situation
Main changes in design
Merged ProjectFileReader class with InputFileSolver as responsibilities were blurry between them.
Improve solution analysis
Purpose
Improve the project discovery and analysis phase and improve the design of associated classes. Fixes relevant issues along the way
Changes
Project discovery and Solution mode (main changes)
Project Analysis
-dev—mode
modifier) as well as analysis result details.CLI
-configuration
: new option that allows to specify which configuration to build (Debug, Release…). This should be a solution configuration in ‘solution’ mode.Misc
dotnet msbuild
instead of msbuild.exe on non windows platformMain changes in design
Github issues
fix #2930, fix #2748, fix #2693, fix #2587 related: #2886, #2393, #2077, #2938