Running All Unit Test cases from a project and Devpartner
-
Freitag, 3. Februar 2012 11:03
I have three projects in my Visual studio soltuion:
1. Web Project. -- Web application
2. Business Logic
3. DAL Logic
4.Unit Test Project -- It has all unit tests.
5. Unit test runner project -- simple windows application with one form with one label and button control on it.
Actually i want to run all my unit test cases from Unit Test runner project. I wrote a piece of code that will execute when button will be clicked in unit test runner project.Code is below:
TestSuiteBuilder builder = new TestSuiteBuilder();
TestSuite suite = builder.Build(@"C:\DevTest\Cost\Cost.NUnitTestRunner\bin\Debug\Cost.UnitTests.dll");
TestResult result = suite.Run(new NullListener());
lblMessage.Text =@"Done.";
This is the code to do code coverage analysis using Devpartner. Code is throwing erroe as Child Test case failed.
When i run my unit test project individually, all the unit test cases are passing successfully.
I basically want to know how to use devpartner to do code coverage analyisis using a runner project like this.
- Bearbeitet nkush Freitag, 3. Februar 2012 11:06
- Verschoben Leo Liu - MSFT Montag, 6. Februar 2012 05:07 Moved for better support. (From:Visual C# General)
Alle Antworten
-
Freitag, 3. Februar 2012 18:14
Hi nkush
Please Post your question in proper forum. your question is regarding Testing Forum
Post your question in below Testing Forum
http://social.msdn.microsoft.com/Forums/en/vsunittest/threads
Regards
Rozy
-
Dienstag, 21. Februar 2012 21:08Besitzer
I am not exactly sure how DevPartner's piece work or interact with the VS solution, maybe a post to them might help. If you are trying to automate the testing process after a build try these:
http://msdn.microsoft.com/en-us/library/ms182465.aspx
http://www.csharptocsharp.com/visual-studio-automate-unit-testingMaybe once the build is setup, you can call your runner app to call the build.
Trevor Hancock (Microsoft)
Please remember to "Mark As Answer" the replies that help.

