locked
Including a CodedUI test to a Load Test project in VS2012 Ultimate RRS feed

  • Question

  • Hi all,

    I'm using Visual Studio 2012 Ultimate. I created a Load Test project and i added a CodedUI test to the project. But there is a problem when i created a new load test in the Load Test project. In the mode Mix test in the dialog New Load Test Wizard, I could not add the CodedUI test that i created, the wizard did not dectect this test. I searched in the internet but no luck.

    Could you tell me a solution please?

    Thanks in advance,

    Bien

    Thursday, February 14, 2013 11:52 AM

Answers

  • Hello Biennl86,

    I would like to know if the coded UI test is within the Test Explorer window after you build the solution completely.

    If the coded UI test can display in the Test Explorer window but it is not detected when you add tests into a load test, I suggest that you can try the following steps to check if it can help you:

    You could locate to the IDE folder then run these commands to check if it can help:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

    Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

    After that you can create a new load test project and add tests into a load test to check the result.

    If still no help, I suggest that you can try to repair the VS.

    if the CodedUI test is integrated in the load test, can it be run with 250 virtual users on the same machin or need controllers/agents (virtual machines)?

    As far as I know you only can run a coded UI test with one virtual user in a load test locally.

    And the coded UI test added to the load test also has this limit when we run it remotely. Only 1 virtual user can run coded UI tests per agent.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by biennl86 Monday, February 18, 2013 5:14 PM
    Monday, February 18, 2013 2:18 AM
  • Hello Amanda Zhu,

    Thank you very much for your help. In fact, my default folder of VS2012 project is a network folder, not on my local PC, and the problem is that I have not the total privilege so VS2012 cannot load the compiled dll of my test. After changing the location of project's folder, it worked.

    And i'm agree with you that we only can run a coded UI test with one virtual user.

    Thanks so much again,

    Bien

    • Marked as answer by biennl86 Monday, February 18, 2013 8:53 AM
    Monday, February 18, 2013 8:52 AM

All replies

  • Hello Biennl86,

    Thank you for your post.

    Based on your description, I have tried your scenario and the coded UI test in WebAndloadTest project can be detected when adding tests in Mix test. I doubt that the coded UI test method has not been loaded completely when you add a test in Mix test dialog.

    I suggest that after you add a coded UI test into the load test project, record actions and generate recorded methods, you try to build the load test project. After building completely and the coded Ui test occurs in the Test Explorer widnow, then you add a load test and select the Coded UI test to the load test to check if the Coded UI test can be detected. Note that you can select “All Loaded Tests” under “Select project to view tests” in Add Tests dialog.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 15, 2013 5:40 AM
  • Hi Amanda,

    Thank you for your reply.

    I did exactly what you suggested to me but it has not worked yet. As you can see in the image below, my LoadTestProject1 has 1 web test (WebTest1.webtest), 1 generic test (genericTest1.GenericTest), 1 CodedUI test (CodedUITest1.cs+UIMap.unitest) and 1 load test (LoadTest2.loadtest) which includes the generic test already:

    And the project is compiled successfully. But in Add Test dialog of the LoadTest2, the CodedUITest1 can not be detected. 

    It can detect only the WebTest1. (I use the french version of VS2012). I tested with an unit test but it can not be detected too. I have no idea about that..

    Any other suggest for this question?

    And I have other question. Normally, i can run the load test with maximum 250 virtual users on my PC, so if  the CodedUI test is integrated in the load test, can it be run with 250 virtual users on the same machin or need controllers/agents (virtual machines)? I have doubt about that.

    Thank you very much.

    Bien


    • Edited by biennl86 Friday, February 15, 2013 1:36 PM Adding sub-question
    Friday, February 15, 2013 10:13 AM
  • Hello Biennl86,

    I would like to know if the coded UI test is within the Test Explorer window after you build the solution completely.

    If the coded UI test can display in the Test Explorer window but it is not detected when you add tests into a load test, I suggest that you can try the following steps to check if it can help you:

    You could locate to the IDE folder then run these commands to check if it can help:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

    Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

    After that you can create a new load test project and add tests into a load test to check the result.

    If still no help, I suggest that you can try to repair the VS.

    if the CodedUI test is integrated in the load test, can it be run with 250 virtual users on the same machin or need controllers/agents (virtual machines)?

    As far as I know you only can run a coded UI test with one virtual user in a load test locally.

    And the coded UI test added to the load test also has this limit when we run it remotely. Only 1 virtual user can run coded UI tests per agent.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by biennl86 Monday, February 18, 2013 5:14 PM
    Monday, February 18, 2013 2:18 AM
  • Hello Amanda Zhu,

    Thank you very much for your help. In fact, my default folder of VS2012 project is a network folder, not on my local PC, and the problem is that I have not the total privilege so VS2012 cannot load the compiled dll of my test. After changing the location of project's folder, it worked.

    And i'm agree with you that we only can run a coded UI test with one virtual user.

    Thanks so much again,

    Bien

    • Marked as answer by biennl86 Monday, February 18, 2013 8:53 AM
    Monday, February 18, 2013 8:52 AM