nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01969
[Bug 881357] Re: CategoryAttribute accepts categories with invalid characters
I had forgotten that we originally ruled out throwing an exception in
the attribute constructor because it causes errors at the time the test
is loaded. I'll mark this bug report as invalid and look at ways of
making the invalid attribute category more obvious to the user. We
already mark the test in question as not-runnable, but the error doesn't
show up unless you manage to run the test in the first place.
** Changed in: nunit-3.0
Status: Triaged => Invalid
** Changed in: nunitv2
Status: Triaged => Invalid
** Changed in: nunitv2
Milestone: 2.6.0 => None
** Changed in: nunitv2
Assignee: Charlie Poole (charlie.poole) => (unassigned)
--
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
https://bugs.launchpad.net/bugs/881357
Title:
CategoryAttribute accepts categories with invalid characters
Status in NUnit Test Framework:
Invalid
Status in NUnit V2 Test Framework:
Invalid
Bug description:
CategoryAttribute should not accept categories containing any of the special characters
used in category expressions: +, -, |, ( or ). An exception should be thrown in the
consructor if an invalid category name is detected.
Original Description:
Version: 2.5.10
Create a test in a category that contains hyphens (in my case V_2011-Sprint-k)
Try to runs tests in this category with the console runner, e.g.
nunit-console.exe wstestrunner.dll /nologo /nodots /labels /xml:temp.xml /include:V_2011-Sprint-k
No tests executed, see console output below:
ProcessModel: Default DomainUsage: Single
Execution Runtime: Default
Included categories: V_2011-Sprint-k
Tests run: 0, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.017 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Filtering by this category works OK in GUI app.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/881357/+subscriptions
References