running only a few of the tests - I can't seem to get test: to work?

17 views
Skip to first unread message

Dennis Fantoni

unread,
Oct 16, 2013, 9:11:54 AM10/16/13
to nuni...@googlegroups.com
I would like to run only a few of my tests, to hunt down a bug..


I have written this in my main.cs :



                new TextUI().Execute(new[] { "-test:TableFindAllFloatBadType", "-test:TableTests1.TableFindAllFloatBadType", "-labels", "-full", "-wait"/* "-out:C:\\Files\\UnitTestDumpCS.txt"*/});


What I am trying to do is to ask NUnitLite to execute only the test void called TableFindAllFloatBadType()

What happens is this :

***** Test.EXE
Tests run: 0, Passed: 0, Errors: 0, Failures: 0, Inconclusive: 0
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Elapsed time: 00:00:00.0070000
Press Enter key to continue . . .

This is the beginning of the unit test i'd like to run

        [ExpectedException("System.ArgumentException")]
        [Test]
        public static void TableFindAllFloatBadType()
        {


If I remove the two strings in the top call, so that the first parameter is -labels , then all my unit tests are run, including the TableFindAllFloatBadType

Am i using the -test: parameter correctly?


Regards,

Dennis

Tyrel Alastair Hunter

unread,
Oct 16, 2013, 9:16:54 AM10/16/13
to nuni...@googlegroups.com
I believe using the -test argument requires the fully qualified test name. Run abb the tests and find the name of the test in your test report and try with that name
—
Sent from Mailbox for iPhone


--
You received this message because you are subscribed to the Google Groups "NUnitLite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunitlite+...@googlegroups.com.
To post to this group, send email to nuni...@googlegroups.com.
Visit this group at http://groups.google.com/group/nunitlite.
For more options, visit https://groups.google.com/groups/opt_out.

Tyrel Alastair Hunter

unread,
Oct 16, 2013, 9:19:25 AM10/16/13
to nuni...@googlegroups.com
Additionally you can add a category attribute to the test as so [Category("debug")]

Then you can execute nunitlite using the  /include:debug argument.

Note this feature was added in nunitlite .97 or .98 so is not available In nunitlite .96 or lower
—
Sent from Mailbox for iPhone


On Wed, Oct 16, 2013 at 6:41 PM, Dennis Fantoni <dennis....@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages