DotCoverAnalyse doesnt work with multiple DotNetCoreTest calls
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 21
Description
### What You Are Seeing?
DotCoverAnalyse only executes once when running DotNetCoreTest for multiple project files and only picks up the result of the first project file that was run against DotNetCorTest
### What is Expected?
DotCoverAnalyse should include results from all of the project files and should support
### What version of Cake are you using?
Cake.Incubator&version=3.0.0
### Are you running on a 32 or 64 bit system?
64 bit
### What environment are you running on? Windows? Linux? Mac?
Windows
### Are you running on a CI Server? If so, which one?
No
### How Did You Get This To Happen? (Steps to Reproduce)
This is the cake script:
```csharp
Task("DotCover")
.IsDependentOn("Build Solution")
.Does(()=>{
DotCoverAnalyse(
tool => {
var settings = new DotNetCoreTestSettings() { NoBuild = true };
var testProjects = GetFiles("./tests/**/*.csproj");
foreach(var testProject in testProjects) {
Information($"Running tests for project: {testProject}");
tool.DotNetCoreTest(testProject.FullPath, settings);
}
},
new FilePath("./test-results/result.html"),
new DotCoverAnalyseSettings(){
ReportType = DotCoverReportType.HTML
}
);
});
```
### Output Log
```
========================================
DotCover
========================================
Running tests for project: C:/Project1.csproj
Running tests for project: C:/Project2.csproj
Running tests for project: C:/Project 3.csproj
JetBrains dotCover Console Runner 2018.2.3. Build 777.0.20180912.160624
Copyright (c) 2009-2018 JetBrains s.r.o. All rights reserved.
[JetBrains dotCover] Coverage session started [10/2/2018 4:58:44 PM]
Test run for C:\Project1\bin\Debug\netcoreapp2.1\JProject1.Tests.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 15.8.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Total tests: 17. Passed: 17. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 2.8562 Seconds
[JetBrains dotCover] Coverage session finished [10/2/2018 4:58:52 PM]
[JetBrains dotCover] Coverage results post-processing started [10/2/2018 4:58:52 PM]
[JetBrains dotCover] Report generation started [10/2/2018 4:58:52 PM]
[JetBrains dotCover] Report generation finished [10/2/2018 4:58:54 PM]
[JetBrains dotCover] Coverage results post-processing finished [10/2/2018 4:58:54 PM]
Task Duration
--------------------------------------------------
Build solution 00:00:01.5444099
DotCover 00:00:10.4584207
--------------------------------------------------
Total: 00:00:12.0028306
```
Contributor guide
Research direction
Start by tracing the DotCoverAnalyse and DotNetCoreTest entry points and reproduce the issue with the provided script using several test project files. Check how the coverage session handles repeated test calls; done means one HTML report includes coverage results from every project rather than only the first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100