nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01601
[Bug 712444] Re: nunit-console /run don't execute parameterized test-cases (with commas in test-case name)
** Summary changed:
- nunit-console /run don't execute parametrized test-cases (with commas in test-case name)
+ nunit-console /run don't execute parameterized test-cases (with commas in test-case name)
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/712444
Title:
nunit-console /run don't execute parameterized test-cases (with commas
in test-case name)
Status in NUnit V2 Test Framework:
Fix Committed
Status in NUnit V2 2.5 series:
Fix Committed
Status in NUnit V2 trunk series:
Fix Committed
Bug description:
To reproduce:
1. Create test-fixture or test-case with 2 string-type parameters
2. Try to run any test-case from such test-fixture
3. or try to run test-case (with 2 parameters of string type)
This issue is caused by: https://code.launchpad.net/~u-launchpad-
brianlow-com/nunitv2/MultiTestNames
Name of parametrized test-case is:
e.g.: Oberon.ATSelenium.TestApps.ATGTests.Lib.CheckoutSanity("iplay","Firefox").FP_AMEX("Guest")
and it contains comma in test name
command-line to run this test:
nunit-console-x86.exe Oberon.ATSelenium.TestApps.ATGTests.Lib.dll /run=Oberon.ATSelenium.TestApps.ATGTests.Lib.CheckoutSanity(\"iplay\",\"Firefox\").FP_AMEX(\"Guest\")
On same time comma is used to split different test-cases from each other in command.
Comma in test-case name is treated as delimiter between test-cases, and as a result test-case is not executed.
Reproducible on versions 2.5.6-2.5.9 (not reproducible on version
lower then 2.5.6)
To fix:
use semicolon ( ; ) as delimiter between test-cases for command line /run
File: NUnit-2.5.9.10348\src\NUnitCore\interfaces\Filters\SimpleNameFilter.cs: 39
I have fixed that locally, updating from
foreach (string name in namesToAdd.Split(','))
to
foreach (string name in namesToAdd.Split(';'))
And running it like:
nunit-console-x86.exe Oberon.ATSelenium.TestApps.ATGTests.Lib.dll /run=Oberon.ATSelenium.TestApps.ATGTests.Lib.CheckoutSanity(\"iplay\",\"Firefox\").FP_AMEX(\"Guest\");Oberon.ATSelenium.TestApps.ATGTests.Lib.CheckoutSanity(\"iplay\",\"Firefox\").FP_VISA(\"Guest\")
- is executing 2 test-cases (which is exactly what I tried to do :) )
References