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

Running Test without vsmdi file

8 Answers 187 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 18 Nov 2010, 10:32 AM
Hi Telerik team,

I'm using VS2010 to create my UI tests. I had included all the tests that i would like to run in my test list and i'm running my test with MSTest. Below is the build command that i used to run my tests from the test list currently.

<Target Name="RunTest" >
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testmetadata:"Amd.Fps.UITest.Solutions\Amd.Fps.UITest.vsmdi"' />
 </Target>

I would like to know is there any way to run my UI tests (.aii) with MsTest without using the vsmdi file?

8 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 18 Nov 2010, 10:10 PM
Hello ching ping,

The .vsmdi is required when using a Visual Studio test list. There are only two alternatives you can try using. You can specify a list of individual tests for MSTest to run like this:

<Target Name="RunTest" >
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test1.aii"' />
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test2.aii"' />
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test3.aii"' />
 </Target>

With this approach you don't need to use a .vsmdi. The bad news is you must specify each individual test and modify the list every time you add or delete a test from your project.

The other alternative is to use our ArtOfTest.Runner.exe instead of MSTest. This command line tool is in the C:\Program Files\Telerik\WebUI Test Studio 2010.3\Bin folder. This tool is documented here and here.

Best wishes,
Cody
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
STEVEN
Top achievements
Rank 1
answered on 19 Nov 2010, 03:01 AM
Is the ArtOfTest.Runner.exe runner compatible with TeamCity?

0
ching ping
Top achievements
Rank 1
answered on 19 Nov 2010, 04:46 AM
Hi Cody,

I noticed that there's a new feature in VS2010 that enable tests to be run without vsmdi files using MSTest. This can be done by adding the tests to 'Test Categories'. Refer to this link for more details, http://msdn.microsoft.com/en-us/library/dd286683.aspx .

I had tried to add my aii test to Test Categories and it doesn't seems to work well. Even though i had added my tests to a predefined 'Test Categories', when i tried to run from command prompt with the below command, it gives me 'No tests to execute' output.

mstest \testcontainer:MyTests.dll \category:"TestCategory1"

Besides, i also noticed that after i assigned a test to a 'Test Categories' in properties, the next time i go back to the properties of that test to check, the 'Test Categories' field is empty, which means it's not assigned to any Test Categories. Below are the steps i took to add test to 'Test Categories'.
 
1. in Test View, click on one of my test (test1), right click -> Properties -> Test Categories -> Add New Category
2. Test Categories in Properties is now assigned to the test categories that i just added
3. Go back to Test View and click on other tests (other than test1)
4. Go back to the Properties of test1, 'Test Categpries' is now empty again

Does this means that this 'Test Categories' feature doesn't work well with WebUI tests?
0
ching ping
Top achievements
Rank 1
answered on 19 Nov 2010, 06:16 AM
Hi Cody,

I had tried to run my test using ArtOfTest.Runner.exe as you recommended. I found out that this aiilist is only available in QA edition and we're using developer edition. Does it means that if i want to run my test from my test list, i would need to run it from MSTest and not from ArtOfTest.Runner.exe? And, it also means that i'll need vsmdi file to run my test list?

Is the 'Test Categories' feature in vs2010 that i mentioned earlier applicable to WebUI tests? 
0
Cody
Telerik team
answered on 23 Nov 2010, 12:06 AM
Hi ching ping,

Unfortunately WebAii tests are not compatible with test categories. They only work with Microsoft Unit Tests. They don't work with Microsoft  WebTests or Microsoft Ordered tests either.

You are correct, you can only create a .aiilist by using the QA edition. I am sorry.

Greetings,
Cody
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release 24/7 on Telerik TV
0
Totti
Top achievements
Rank 1
answered on 21 Feb 2011, 11:57 AM
<Target Name="RunTest" >
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test1.aii"' />
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test2.aii"' />
  <Exec Command ='"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:"buildpath\test3.aii"' />
 </Target>

Hi,
I want to know that which file configure does includes block of code above ?

Thanks.
0
Totti
Top achievements
Rank 1
answered on 21 Feb 2011, 11:58 AM

0
Cody
Telerik team
answered on 23 Feb 2011, 04:39 PM
Hello ching ping,

The block of code you have quoted belongs inside of an MSBuild script and documented on MSDN.

Regards,
Cody
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
ching ping
Top achievements
Rank 1
Answers by
Cody
Telerik team
STEVEN
Top achievements
Rank 1
ching ping
Top achievements
Rank 1
Totti
Top achievements
Rank 1
Share this question
or