question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing additional arguments to dotnet test

See original GitHub issue

Is it possible to pass additional options to the dotnet test command, when running via the .NET test explorer? If not, would it be difficult to add a setting?

E.g. dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov

We want this feature so that we can generate a coverage file from https://github.com/tonerdo/coverlet/ so that it can be picked up by https://github.com/ryanluker/vscode-coverage-gutters .

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
stefanforsbergcommented, Jul 12, 2018

Should be fixed with dotnet-test-explorer.testArguments, give it a spin =)

1reaction
janakacommented, Jul 11, 2018

In addition to enabling general args, when they release code coverage into dotnet CLI on both Windows and Linux we should consider adding this as a special option. Something like dotnet-test-explorer.generateCodeCoverage=[true[default]|false]

https://github.com/Microsoft/vstest-docs/blob/master/RFCs/0021-CodeCoverageForNetCore.md

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to pass parameters to the dotnet test command while ...
Unfortunately, the only way to pass settings from dotnet test into NUnit is to use a .runsettings ...
Read more >
Passing test run parameters when using dotnet test ... - GitHub
@mikkelbu is correct, it isn't currently possible to pass command line parameters using dotnet test to the underlying test adapter/framework.
Read more >
dotnet test command - .NET CLI | Microsoft Learn
The dotnet test command is used to execute unit tests in a given project. ... Specifies extra arguments to pass to the adapter....
Read more >
[Solved]-Passing arguments to dotnet test project?-.net-core
At this moment, there is no way to pass parameters to any .net test project. You could use the mstest testsettings/runsettings file, but...
Read more >
Passing parameters to NUnit tests using Azure Pipelines
For the test step in your pipeline YAML, use the .NET Core CLI task (e.g. DotNetCoreCLI@2 ) to call the dotnet test command....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found