While it's true that NUnit uses a test id internally, you can't use
that ID directly
to select tests. It's incorporated in the TestName, which also includes the
full name of the test. TestName is a class in NUnit, which is analogous to
AssemblyName.
NUnit assigns TestNames to each test and returns them to the runner so
that they can then be used to select individual tests. But this is only useful
in runners that maintain info about the tests and allow multiple runs - such
as the Gui runner. The console runner, of course, only runs tests one time
and exits. The console runner has no advance knowledge of what ids
will be assigned and so can only select on the basis of the class or
method name itself.
Tests can also be run based on Categories, which are basically tags. In
NUnit 3.0, we plan to add selection by Property value, which would allow
you to do what you want.
If you can explain further why you want to do this, perhaps we can
come up with an alternate approach that would help you.
Charlie
> --
> You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
>
>