This is a migrated thread and some comments may be shown as answers.

Running tests in multiple test list

2 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ching ping
Top achievements
Rank 1
ching ping asked on 10 Jan 2011, 06:45 AM
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 Answers, 1 is accepted

Sort by
0
ching ping
Top achievements
Rank 1
answered on 10 Jan 2011, 08:28 AM
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".
0
Keaegan
Telerik team
answered on 12 Jan 2011, 11:27 PM
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
Tags
General Discussions
Asked by
ching ping
Top achievements
Rank 1
Answers by
ching ping
Top achievements
Rank 1
Keaegan
Telerik team
Share this question
or