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.

In nunit3-console you cannot pass parameters containing ';' because they always get splitted

See original GitHub issue

@SilverXXX commented on Fri Jul 22 2016

When running some tests with nunit3-console.exe, if you pass with --param there is no way to pass inside a value a ‘;’.

It seems from CommandLineOptions.cs the you can’t escape them in any way (it’s not documented so i read the source directly). A regex to capture only not escaped char would solve the problem (i’m not a regex expert so i cant suggest exact one)


@rprouse commented on Fri Jul 22 2016

See our docs, there is general information there on quoting for various operating systems. You can also have multiple --param in the command line, one per variable.

I am closing this as a question, but feel free to add questions, we will see them and try to help.


@ChrisMaddock commented on Fri Jul 22 2016

@rprouse - I think this is a potential ‘issue’ within NUnit, not command line usage? Looks like the options will always split on semi-colon, and then throw if it’s not a valid A=B format afterwards? So I don’t think there is any way pass in a test parameter with a semi-colon currently. (If that’s to be a supported thing to do!)


@SilverXXX commented on Fri Jul 22 2016

Yes @ChrisMaddock, i would have tried to create a pull request to show a possible solution, it actually require only a one line change and a sensible regexp, but i’m quite bad at it (a connection string is a simple example of an impossible paramater to pass right now) Edit: and since it’s all made of key=value it doesnt even return an error


@rprouse commented on Fri Jul 22 2016

Sorry, reading issues on my phone, I missed the detail 😦

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:50 (34 by maintainers)

github_iconTop GitHub Comments

2reactions
rprousecommented, Feb 2, 2019

I think --testparam or -runparam would be fine.

To the whole not breaking the API and SemVer, I think it is a nice ideal and we shouldn’t introduce subtle hard to diagnose behavior changes, but I think we should be free to break things in obvious ways in order to fix things. To me, incrementing the version to 4.0 to do that isn’t realistic or practical and I don’t think the majority of ‘dark matter’ developers even realize the significance of it. If our experience moving from 2.x to 3.x is anything, developers will still complain that you moved their cheese even if you’re yelling the breaking changes to the world 😄

I find these long back and forth discussions a bit overwhelming and hard to keep track of especially for such a small issue. We have enough work keeping up without adding to it ourselves.

1reaction
CharliePoolecommented, May 29, 2017

@jnm2 Quite confusing, I’d say!

I’m not sure that such a feature would be any easier than what we can do already. Plus, we would still have to handle all other (non NUnit 3) frameworks differently. Better to have one approach that works for all. Seems to me that the concept of a driver is what gives us the capability to “recognize” and give an error for anything the framework we are driving won’t handle. The driver is the only part of the engine that knows what framework it is using and what it is capable of.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Pass parameters from nunit3-console to TestFixture ...
I have a problem with executing test from nunit3-console. I need to pass parameters to TestFixture constructor, but i want to call an...
Read more >
Console and Engine Release Notes
Dispose causes run to hang; 23 In nunit3-console you cannot pass parameters containing ';' because they always get split; 178 Add date and...
Read more >
Getting Started with NUnit | TeamCity Documentation
If it is not possible, the test launch can be split into several steps and define a configuration file in each of the...
Read more >
Passing parameters to test method from Nunit console runner
In this video we will discuss passing parameters to test method from Nunit console runner. #ExecuteAutomation #Specflow #NUnit #VisualStudio ...
Read more >
Chocolatey Software | NUnit 3 Console Runner 3.10.0
If you want to use your own addins, created by you for use under NUnit V2, then you have to run the tests...
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