Reputation: 99
I need to create the NUnit Test case automatically from my .Net Solution file. Morover this needs to be done , from command line. I heard Pex create test cases automatically. Let know
Upvotes: 1
Views: 1532
Reputation: 28435
Ryan Gross' answer points to the right direction.
However Pex.exe generates Unit Tests from Parameterized Unit Tests, not from application classes itself.
To generate Parameterized Unit Tests you need to run pexwizard.exe
pexwizard.exe <your assembly name> options
Possible options are described in http://testoriented.googlecode.com/svn-history/r89/suitability/trunk/Tools/Pex-0.22.50128.1/pexwizard.txt
Upvotes: 1
Reputation: 6515
The following steps should get you there:
[assembly: Pex.NUnit.PexNUnitPackage]
pex.exe bin\Debug\TestProjectName.dll
reports\TestProjecName.#####.#####\tests
.You can read more about this in Exercise 5 of Parameterized Unit Testing with Microsoft Pex
Upvotes: 3