Running Test without vsmdi file

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

    Posted 18 Nov 2010 Link to this post

    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?
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Nov 2010 Link to this post

    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!
  3. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 18 Nov 2010 Link to this post

    Is the ArtOfTest.Runner.exe runner compatible with TeamCity?

  4. ching ping
    ching ping avatar
    3 posts
    Member since:
    Sep 2010

    Posted 18 Nov 2010 Link to this post

    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?
  5. ching ping
    ching ping avatar
    3 posts
    Member since:
    Sep 2010

    Posted 19 Nov 2010 Link to this post

    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? 
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Nov 2010 Link to this post

    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
  7. Totti
    Totti avatar
    10 posts
    Member since:
    Sep 2010

    Posted 21 Feb 2011 Link to this post

    <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.
  8. Totti
    Totti avatar
    10 posts
    Member since:
    Sep 2010

    Posted 21 Feb 2011 Link to this post


  9. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 23 Feb 2011 Link to this post

    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!
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!