diff --git a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs index 1adcbf722e..06c1ccc809 100644 --- a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs +++ b/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Mono.Cecil; using Stryker.Core.Baseline.Providers; @@ -52,7 +53,7 @@ public IEnumerable MutateProjects(StrykerOptions options, if (!projectInfos.Any()) { _logger.LogWarning("No project to mutate. Stryker will exit prematurely."); - yield break; + return Enumerable.Empty(); } _initializationProcess.BuildProjects(options, projectInfos); @@ -63,10 +64,12 @@ public IEnumerable MutateProjects(StrykerOptions options, InitializeDashboardProjectInformation(options, projectInfos.First()); var inputs = _initializationProcess.GetMutationTestInputs(options, projectInfos, _runner); - foreach (var mutationTestInput in inputs) + var mutationTestProcesses = new List(); + Parallel.ForEach(inputs, mutationTestInput => { - yield return _projectMutator.MutateProject(options, mutationTestInput, reporters); - } + mutationTestProcesses.Add(_projectMutator.MutateProject(options, mutationTestInput, reporters)); + }); + return mutationTestProcesses; } private void InitializeDashboardProjectInformation(StrykerOptions options, SourceProjectInfo projectInfo) diff --git a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs index 92624e0290..689ea42e6c 100644 --- a/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs +++ b/src/Stryker.Core/Stryker.Core/MutationTest/CsharpMutationProcess.cs @@ -48,7 +48,7 @@ public CsharpMutationProcess( /// This constructor is used by the initialization logic. /// /// - public CsharpMutationProcess(StrykerOptions options) : this( null, options) + public CsharpMutationProcess(StrykerOptions options) : this(null, options) { } public void Mutate(MutationTestInput input) @@ -59,7 +59,7 @@ public void Mutate(MutationTestInput input) var semanticModels = compilingProcess.GetSemanticModels(projectInfo.GetAllFiles().Cast().Select(x => x.SyntaxTree)); // Mutate source files - foreach (var file in projectInfo.GetAllFiles().Cast()) + foreach(var file in projectInfo.GetAllFiles().Cast()) { _logger.LogDebug($"Mutating {file.FullPath}"); // Mutate the syntax tree diff --git a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs index 240f61d120..6b277ac738 100644 --- a/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs +++ b/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs @@ -239,7 +239,7 @@ private CoverageRunResult BuildCoverageRunResultFromCoverageInfo(string property leakedMutants = string.IsNullOrEmpty(propertyPairValue) ? Enumerable.Empty() : propertyPairValue.Split(',').Select(int.Parse); - _logger.LogWarning( + _logger.LogDebug( $"VsTestRunner: Some mutations were executed outside any test (mutation ids: {propertyPairValue})."); } else