locked
Cannot Run OrderedTest and Coded UI Test by VS Test Agents 2010 RRS feed

  • Question

  • Dear all,

    I try to test the case of only install the VS Test Agent 2010 (without VS2010) and run the Coded UI Test in a standalone machine, and I try to setup the machine as following

    - The standard Machine  is Win7 Enterprise 64 bits

    - Installed .NET 4.0 Framework

    - Installed Visual Studio Agents 2012U3 "TestAgents" and it automatically install the .NET framework 4.5 for me (but I find that I cannot run the Coded UI test that is compiled in VS2010, hence I try to install VS Test Agent 2010)

    - Installed Visual Studio Agents 2010 "TestAgents" and I find I can call MSTest and start the Ordered Test list,

    But when start the first OrderedTest list, I find the following log and the MSTest halt for long time as following logging and cannot proceed...

    C:\AppUnitTest\WorkSpace\Bin>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:C:\AppUnitTest\WorkSpace\TestExecutable\TestCommon\FindCategories.orderedtest /resultsfile:../Log/FindCategories_SearchRequest.trx 
    Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
    Copyright (c) Microsoft Corporation. All rights reserved.
        
    Loading C:\AppUnitTest\WorkSpace\TestExecutable\TestCommon\FindCategories.orderedtest...
    Starting execution...

    The test method inside that Find Catergories.orderedtest is not Coded UI but a simple MS Unit Test Method and work normal for all machine that have installed VS2010

    Hence my question is:

    1. Is there any wrong on my steps?

    2. As it halt for long time without any printout from MSTest, what is doing in MSTest? do we have any log to check where and what's wrong?

     

    Friday, September 6, 2013 10:31 AM

Answers

  • Hi,

    1. Why I cannot use Test Agent 2012U3 to run the Test Project that compile on VS2010 (build in another machine)

    If you build this test app with VS2012 and make sure that it works well in VS2012, and then move it to this test Agent 2012 machine, run it, does it work?

    2. Why I even cannot run the Test Project by Test Agent 2010 if both Test Agent 2012U3 and 2010 found in same machine?

    I try to install the Test Agent 2010, and then I install the Test Agent 2012 in my VS machine, I would get the error warning like the following screen shot, so we couldn’t install two versions in the same machine.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 11, 2013 10:22 AM
  • Hi,

    Glad to see the second issue has been resolved.

    About the first issue, we know that generally the VS2012 could support the VS2010 test project with SP1. But we know that if we open the VS2010 test project in VS2012, it will update assemblies’ version number to the latest version like 11.0, and then we could run it in VS2012. But if you just run the VS2010 project with Test Agent2012 in command line locally, does it reference the latest assemblies’ version? That’s reason why I suggest you re- compile the old project in VS2012, and then copy it to your test agent 2012 machines.

    Or you could open your project in Notepad, and then find the difference before/after you update it in VS2012, so you would know how to change the assemblies’ version information manually, and then you could run old test project with Test Agent 2012 Environment (without the VS2012) locally.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 12, 2013 2:40 AM
  • Noted and get you meaning, thx alot
    • Marked as answer by TungLee Thursday, September 12, 2013 2:56 AM
    Thursday, September 12, 2013 2:55 AM

All replies

  • Hi TungLee,

    Glad to see you again.

    Just to make this issue clearly, do you mean that you install the Test Agent 2012 and Test Agent 2010 in the same machine (without the VS)? Do you run it with the Test Agent 2012 before you run the MSTest with Test Agent 2010 in command line?

    Sorry for that I don’t have a clean machine to repro this issue now, but as far as I know, we could run the unit test or the ordered test with MSTest in the Test Agent machine.

    1. Please remove Test Agent 2012, and then copy a new test project created in VS2010, and then run it with Test Agent 2010.
    2. If possible, you could just run the unit test with this Environment, check it again.

    C:\AppUnitTest\WorkSpace\Bin>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:C:\AppUnitTest\WorkSpace\TestExecutable\TestCommon\FindCategories.orderedtest /resultsfile:../Log/FindCategories_SearchRequest.trx

    If possible, please set the location to the ordered/unit test folder, and then run it like the following simple command line:

    cd "the path of your test" Enter.

    MSTest.exe /testContainer: A.orderedtest(or your unit test), check it again.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 10, 2013 1:50 AM
  • Per checking and find the following

    - as my test project is build and compile in VS2010, it seem cannot run in VS11 (VS Test Agent 2012U3)

    - seem even I install VS Test Agent 2010 but still cannot work if not uninstall the VS Test Agent 2012U3

    - When I try to uninstall VS Test Agent 2012U3 and .NET Framework 4.5, and the machine only have .NET 4.0 and Test Agent 2010, it back to normal

    If I want to setup a test machine and run both Test Project that is built by VS2010 and VS2012, how can I do in the setup and test execution?

    Tuesday, September 10, 2013 2:09 AM
  • Hi TungLee,

    Please check Event Viewer, hope we could get more log message.

    I doubt that it will be related to the two Test Agents, I have installed the two Agents before (I have installed VS2010 and VS2012), but it seems that I could just install the latest Agent 2012.

    I ran a VS2012 coded UI test in VS2010 before, it didn’t work if we ran it in MSTest, but if we recompile this project in VS2010, and then run it, it will works well in VS 2010 IDE or the command line, as far as I know, it is related to the different .dll files version number. So if possible, you could check your project, whether it references the .net framework 4.5 in your test project? Or as my previous reply “Do you run it with the Test Agent 2012 before you run the MSTest with Test Agent 2010 in command line?”.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 10, 2013 9:46 AM
  • My finding is as following

    - I install Test Agent 2010 and 2012, .NET 4.0 and .NET 4.5

    - My Test Project is build in VS2010 on .NET 4.0

    - I explicitly call MSTest in VS2012 for the Test Project and not work

    - I explicitly call MSTest in VS2010 for the Test Project and also not work

    - I try to uninstall the VS2012 and .NET 4.5 and rerun the Test Project by VS2010 and work now.

    Since we not try to control the MSTest by Test Agent Windows Process, I have to quit the Test Agent service and explicitly run the Test by command line starting MSTest with a orderedtest file...

    Tuesday, September 10, 2013 9:53 AM
  • Hi TungLee,

    Glad to receive your reply.

    I try to uninstall the VS2012 and .NET 4.5 and rerun the Test Project by VS2010 and work now.

    You mean that you uninstall the Test Agent 2012 and .net 4.5, am I right?

    1. My Test Project is build in VS2010 on .NET 4.0

    2. I explicitly call MSTest in VS2012 for the Test Project and not work

    3. I explicitly call MSTest in VS2010 for the Test Project and also not work

    If you doesn’t run the step 2, just run it with MSTEST in VS2010 after you move this test project to this Environment, does it work?

    If it works well, I doubt that it will be related to the assembly version number. If it still has this issue, since it works well after you remove the 2012 Environment, I doubt that there is a conflict between the two Test Agents versions in the same machine like this thread.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Wednesday, September 11, 2013 2:40 AM
  • Q1, yes I finally remove the .NET framework 4.5 and VS Agents 2012U3 to make it work

    Q2, if not run step 2, just run MSTest for VS Test Agent 2010, it still not work if the Test Agent 2012U3 and .NET 4.5 not yet uninstalled

    Hence, I can make my case work explicitly, but my question and concern is,

    1. why I cannot use Test Agent 2012U3 to run the Test Project that compile on VS2010 (build in another machine)

    2. why I even cannot run the Test Project by Test Agent 2010 if both Test Agent 2012U3 and 2010 found in same machine?

    If for this case that I have different projects that is compiled by different VS version, we need to set so many Test Agents, and we cannot share the Test Agent machines for different VS version, is it?

    Best Regards

    Wednesday, September 11, 2013 8:33 AM
  • Hi,

    1. Why I cannot use Test Agent 2012U3 to run the Test Project that compile on VS2010 (build in another machine)

    If you build this test app with VS2012 and make sure that it works well in VS2012, and then move it to this test Agent 2012 machine, run it, does it work?

    2. Why I even cannot run the Test Project by Test Agent 2010 if both Test Agent 2012U3 and 2010 found in same machine?

    I try to install the Test Agent 2010, and then I install the Test Agent 2012 in my VS machine, I would get the error warning like the following screen shot, so we couldn’t install two versions in the same machine.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 11, 2013 10:22 AM
  • For Q1, do you mean we should install Test Agents 2010 for VS2010 Test Project?

    As my first guess is TestAgents 2012U3 can support both VS2010 Test Project and VS2012 Test Project. Do I get a wrong concept?

    And for Q2, noted and this mean that it should not be coexist... thx you help on this question!

    Wednesday, September 11, 2013 10:27 AM
  • Hi,

    Glad to see the second issue has been resolved.

    About the first issue, we know that generally the VS2012 could support the VS2010 test project with SP1. But we know that if we open the VS2010 test project in VS2012, it will update assemblies’ version number to the latest version like 11.0, and then we could run it in VS2012. But if you just run the VS2010 project with Test Agent2012 in command line locally, does it reference the latest assemblies’ version? That’s reason why I suggest you re- compile the old project in VS2012, and then copy it to your test agent 2012 machines.

    Or you could open your project in Notepad, and then find the difference before/after you update it in VS2012, so you would know how to change the assemblies’ version information manually, and then you could run old test project with Test Agent 2012 Environment (without the VS2012) locally.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 12, 2013 2:40 AM
  • Noted and get you meaning, thx alot
    • Marked as answer by TungLee Thursday, September 12, 2013 2:56 AM
    Thursday, September 12, 2013 2:55 AM