Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing test run parameters when using dotnet test through command line #404

Closed
itaymelamed opened this issue Apr 15, 2018 · 10 comments
Closed

Comments

@itaymelamed
Copy link

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

command:
dotnet test --params=test=test

@mikkelbu
Copy link
Member

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 #364 (comment)).

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

@rprouse
Copy link
Member

rprouse commented Apr 16, 2018

@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.

@tomern
Copy link

tomern commented Apr 17, 2018

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

@noam198411
Copy link

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

@ylevina
Copy link

ylevina commented Jul 10, 2018

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

@ChrisMaddock
Copy link
Member

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

@mikkelbu
Copy link
Member

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

@ChrisMaddock
Copy link
Member

Interesting!

@rprouse
Copy link
Member

rprouse commented Jul 10, 2018

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 😄

@ChrisMaddock
Copy link
Member

This issue will be taken care of under #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. 🙂

@ChrisMaddock ChrisMaddock added this to the Closed Without Action milestone Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants