Closed CzBuCHi closed 1 year ago
fixed localy by editing https://github.com/stryker-mutator/stryker-net/blob/005dca01ea52aa180f68bcd1526d4a6d970fd150/src/Stryker.Core/Stryker.Core/Reporters/Json/JsonReport.cs#LL69C5-L69C5 :
- TestFiles.Add(testFile.FilePath, new JsonTestFile(testFile));
+ TestFiles.TryAdd(testFile.FilePath, new JsonTestFile(testFile));
Thanks for reporting this. The correct fix is a bit more complex: Stryker needs to merge both test files, as there may be differences due to compilation symbols: same source files, but with different detected tests. Keeping only the first one would lead to loss of information.
The initial implementation actually did contain a merge of test files to prevent data loss, but it was decided during review that it was probably unlikely to be needed... Guess not :)
Edit:
Actually no, the merging was done in TestFile and not in JsonTestFile.
Describe the bug I have file that is imported in every single project in solution (SharedAssemblyInfo.cs to be precise). When running stryker on whole solution it ends up with this exception:
Expected behavior merge all reports for given file into single one (looking at
JsonTestFile
and it dont look to complicated to merge 2 into one ...)Desktop (please complete the following information):
Additional context I would expect non zero return code when this happends ...