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

Comments

Projects
None yet
7 participants
@itaymelamed

itaymelamed commented Apr 15, 2018

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

command:
dotnet test --params=test=test

@mikkelbu

This comment has been minimized.

Show comment
Hide comment
@mikkelbu

mikkelbu Apr 15, 2018

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.

Member

mikkelbu commented Apr 15, 2018

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

This comment has been minimized.

Show comment
Hide comment
@rprouse

rprouse Apr 16, 2018

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@tomern

tomern Apr 17, 2018

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

tomern commented Apr 17, 2018

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

@noam198411

This comment has been minimized.

Show comment
Hide comment
@noam198411

noam198411 Apr 17, 2018

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

noam198411 commented Apr 17, 2018

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

@YuliaLevina

This comment has been minimized.

Show comment
Hide comment
@YuliaLevina

YuliaLevina Jul 10, 2018

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

YuliaLevina commented Jul 10, 2018

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

@ChrisMaddock

This comment has been minimized.

Show comment
Hide comment
@ChrisMaddock

ChrisMaddock Jul 10, 2018

Member

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

Member

ChrisMaddock commented Jul 10, 2018

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

@mikkelbu

This comment has been minimized.

Show comment
Hide comment
@mikkelbu

mikkelbu Jul 10, 2018

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

Member

mikkelbu commented Jul 10, 2018

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

This comment has been minimized.

Show comment
Hide comment
@ChrisMaddock

ChrisMaddock Jul 10, 2018

Member

Interesting!

Member

ChrisMaddock commented Jul 10, 2018

Interesting!

@rprouse

This comment has been minimized.

Show comment
Hide comment
@rprouse

rprouse Jul 10, 2018

Member

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 😄

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

This comment has been minimized.

Show comment
Hide comment
@ChrisMaddock

ChrisMaddock Oct 5, 2018

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

Member

ChrisMaddock commented Oct 5, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment