How do I use the /runlist command to run a series of tests?

Asked by Sara M

For example, if under mock-assembly.dll, I only wanted to run the following tests and testcases:

NUnit.Tests.Assemblies.MockTestFixture

NUnit.Tests.Assemblies.GenericFixture

NUNit.Tests.Assemblies.IgnoredFixture

NUnit.Tests.Assemblies.ParameterizedFixture

I read that I had to include the full name of the test in a text file then run the command in the command prompt: nunit-console /runlist:testlist.txt C:~\mock-assembly.dll

However, it says that zero tests ran.

What am I doing wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
NUnit V2 Edit question
Assignee:
No assignee Edit question
Solved by:
Charlie Poole
Solved:
Last query:
Last reply:
Revision history for this message
Best Charlie Poole (charlie.poole) said :
#1

I assume you typed the above four lines into testlist.txt and saved it in
the current directory. Also, I'm assuming that the misspelling of NUNit on
the third line is only in this question, not in your actual file.

If you did that, the tests in MockTestFixture should have run. The other
fixtures are not in that namespace, but in NUnit.Tests - check the source.

Additionally, assuming you want to run the generic fixture, the test name
is GenericFixture<T>.

Here's my own file, which ran correctly...

NUnit.Tests.Assemblies.MockTestFixture
NUnit.Tests.GenericFixture<T>
NUnit.Tests.IgnoredFixture
NUnit.Tests.ParameterizedFixture

On Tue, Aug 13, 2013 at 11:26 AM, Sara M <
<email address hidden>> wrote:

> New question #233969 on NUnit V2:
> https://answers.launchpad.net/nunitv2/+question/233969
>
> For example, if under mock-assembly.dll, I only wanted to run the
> following tests and testcases:
>
> NUnit.Tests.Assemblies.MockTestFixture
>
> NUnit.Tests.Assemblies.GenericFixture
>
> NUNit.Tests.Assemblies.IgnoredFixture
>
> NUnit.Tests.Assemblies.ParameterizedFixture
>
> I read that I had to include the full name of the test in a text file then
> run the command in the command prompt: nunit-console /runlist:testlist.txt
> C:~\mock-assembly.dll
>
> However, it says that zero tests ran.
>
> What am I doing wrong?
>
> --
> You received this question notification because you are an answer
> contact for NUnit V2.
>

Revision history for this message
Sara M (smorsi27) said :
#2

Thanks Charlie Poole, that solved my question.

Revision history for this message
Sara M (smorsi27) said :
#3

Haha, it was probably the misspelling of NUnit and I didn't add <T> to the GenericFixture.

Thank you. /runlist is super helpful :D