Nunit-console: Passing test run parameters when using dotnet test through command line

Created on 15 Apr 2018  路  10Comments  路  Source: nunit/nunit-console

--params flag does not work when using "dotnet test" from the command line.

command:
dotnet test --params=test=test

duplicate

Most helpful comment

It is a very basic and necessary feature, please add this.

All 10 comments

I don't think this is the right project, as the console is not used by dotnet test. Instead you need the NUnit 3 Visual Studio Test Adapter (see e.g. https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard). But as far as I can tell, it is not possible to pass parameters to vstest from the commandline (see nunit/nunit3-vs-adapter#323 and https://github.com/nunit/nunit-console/issues/364#issuecomment-361759798).

I'll leave the issue open until a more knowledgeable person can provide a definite answer.

@mikkelbu is correct, it isn't currently possible to pass command line parameters using dotnet test to the underlying test adapter/framework. This is a limitation of dotnet test and the reason we are planning on creating a dotnet nunit command or something similar. That will give us more control.

It is a very basic and necessary feature, please add this.

I planned to move from .Net framework to .Net Core, if you can't send parameters via command line, I would have to wait :(

Hi, Is there any progress with dotnet nunit command? Thanks!

Not yet sorry. It's very much on our roadmap.

But we should remember / be aware that this could be a lot of work (aka hitting a moving target). https://twitter.com/xunit/status/1000073513015767040?s=19

Interesting!

I'm not sure how this will end up, but we have been making a bit of progress in the background merging our .NET Standard code back into the engine so that we have one codebase again. I hope that this will allow us to create our own .NET Core command line runner, but we will see how that turns out with the shifting landscape 馃槃

This issue will be taken care of under https://github.com/nunit/nunit-console/issues/475. We're continuing work on .NET Core support at the moment - please see https://github.com/nunit/nunit-console/projects/1 for the overall project view.

I'm going to close this issue in favour of the #475 - but please feel free to add any comments over there. 馃檪

Was this page helpful?
0 / 5 - 0 ratings