zeus
zeus

Reputation: 12975

DunitX, how to run only one test?

Everytime I run my DUnitX project, it's ran all tests. Is their a simple way to make it run only one test (The test I m working on for example)? Is it possible specify the test to run in the command line?

Upvotes: 2

Views: 680

Answers (2)

RaelB
RaelB

Reputation: 3481

To the first part of your question:

Is their a simple way to make it run only one test

DUnitX will skip private methods. So just add a private label (i.e. section) on top of all your tests, and leave the one you want to test in a public/published section.

When you're done, remove the private label.

Upvotes: 2

Rohit Gupta
Rohit Gupta

Reputation: 4185

I haven't used the options yet but it appears that it has command line options to run one test or multiple tests, or use a file to hold the tests to run.

All available options:

--options:value or -opt:value - Options File

--hidebanner or -b - Hide the License Banner

--xmlfile:value or -xml:value - XML output file path

--runlist:value or -rl:value - Specify the name of a file which lists the tests to run

--run:value or -r:value - Specify the tests to run, separate by commas

--include:value or -i:value - Specify the categories to include

--exclude:value or -e:value - Specify the categories to exclude

--dontshowignored or -dsi - Don't show ignored tests

--loglevel:value or -l:value - Logging Level - Information, Warning, Error

--exitbehavior:value or -exit:value - Exit behavior - Continue, Pause

--h or -? - Show Usage

DUnitX command line options

Upvotes: 2

Related Questions