formulahendry / formulahendry/vscode-dotnet-test-explorer
Using runsettings file in testArguments causes duplicate results/coverage to be collected
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
I have a simple `.runsettings` file in the root of my repo which just collects coverage:
```xml
lcov
```
When I run `dotnet test`, I provide the path to the settings file, and it generates the coverage in a single folder:
```sh
dotnet test --settings .runsettings
```

However when I set the `dotnet-test-explorer.testArguments` setting to `"--settings .runsettings"` and run the same tests, it generates _two_ folders; one similar to before, and another which is named after the host machine name (in this example, **zebra** is my computer name).

Both `coverage.info` files in the second example contain the exact same data.
Why is this extension collecting the same test results twice when the underlying `dotnet test` command does not, and how can I suppress the duplicate test results?
#### Notes:
I have tried using the format suggested on the readme, `"--settings:./.runsettings"`, however it produces the same results.
I know that I can use `/p` parameters instead to collect coverage as suggested in the readme (`/p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=../../lcov.info`), and this works nicely, however I need to use the runsettings as part of my workflow. As such, I'd rather avoid having two separate configurations, and have everything just reading from the runsettings file.
#### Debug info:
1. Dotnet sdk version: `8.0.100`
2. Unit test framework and relevants versions of that: `xunit 2.4.2`
3. A link to a repo that replicated the issue: Can create one if required
4. OS: Linux Mint 21.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.