Running tests in multiple test list

3 posts, 0 answers
  1. ching ping
    ching ping avatar
    3 posts
    Member since:
    Sep 2010

    Posted 10 Jan 2011 Link to this post

    Hi Telerik team,

    What is the correct way to run my tests when i have more than 1 test list (I'm using MSBuild to run my tests)? Say, i have 2 test lists which are "MyTestList1" and "MyTestList2".

    I tried to use below command in my build scipt but it seems to execute the tests in my first test list ("MyTestList1") only :


    <Target Name="BuildSolution" > 
     <MSBuild Projects="@(ProjectsToBuild)"/>
      <CallTarget Targets="RunTest" /> -->
    </Target>

    <Target Name="RunTest" >
      <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testmetadata:"Amd.Ca.UITest.vsmdi" /testlist:"MyTestList1"' />
     <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testmetadata:"Amd.Ca.UITest.vsmdi" /testlist:"MyTestList2"' />
    </Target>
  2. ching ping
    ching ping avatar
    3 posts
    Member since:
    Sep 2010

    Posted 10 Jan 2011 Link to this post

    Hi,

    Just to add in some information. If the tests in "MyTestList1" passed, it'll go and execute the tests in "MyTestList2",  but if any test in "MyTestList1" failed, then it'll skip executing the tests in "MyTestList2".
  3. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 12 Jan 2011 Link to this post

    Hi ching ping,

    Thank you for your inquiry on setting up your build script. It sounds like you want both sets of tests to run regardless of whether one of them passes/fails. If this is the case, you SHOULD be able to accomplish this by naming each test list as it's own target:

    <Target Name="RunTest1" >
      <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testmetadata:"Amd.Ca.UITest.vsmdi" /testlist:"MyTestList1"' />
    </Target>
    <Target Name="RunTest2">
      <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testmetadata:"Amd.Ca.UITest.vsmdi" /testlist:"MyTestList2"' />
    </Target>


    And then calling each item separately. In order to confirm this I will need additional time to setup a build server to confirm this is the case. Please try using the above, and then having 2 separate lines for "CallTarget", each one targeting a different test list. Execute the build and let me know if you have the correct feedback.

    If not we can setup similarly here and research the best way to accomplish this process (using MSbuild to run test lists independently/separately of one another, including their results).

    Best wishes,
    Keaegan
    the Telerik team

    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Back to Top