Running All Unit Test cases from a project and Devpartner

Unanswered Running All Unit Test cases from a project and Devpartner

  • Friday, February 03, 2012 11:03 AM
     
     

    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.

    • Edited by nkush Friday, February 03, 2012 11:05 AM
    • Edited by nkush Friday, February 03, 2012 11:06 AM
    • Edited by nkush Friday, February 03, 2012 11:06 AM
    • Edited by nkush Friday, February 03, 2012 11:06 AM
    • Moved by Leo Liu - MSFT Monday, February 06, 2012 5:07 AM Moved for better support. (From:Visual C# General)
    •  

All Replies