Coded UI testing with a Network Isolated Virtual Environment snapshot RRS feed

  • Question

  • My question is how to create a snapshot to run my automated testing which includes Coded UI. 

    Here is what I have tried.  Get my Virtual Environment (network isolated) to the point where all three of the capabilities are happy (blue checkmarked).  Log in as the local user on each VM within the VE (which happens to also be how the Test Agent runs).  Create the snap shot.

    When my auto test runs (against that snapshot), I do see that it begins to run thru the tests (I see the lock icon next to test capability in MTM), but it errors eventually with the following:

    "Error calling Initialization method for test class TestG1Tracking.ConfigureWizard: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: Automation engine is unable to playback the test because it is not able to interact with the desktop. This could happen if the computer running the test is locked or it’s remote session window is minimized."

    I have even tried it with a snapshot where I don't log onto each VM (and make sure that the capabilites are all happy, but I get the same result.

    • Edited by MaryTFS Thursday, September 20, 2012 7:42 PM
    • Changed type MaryTFS Friday, September 21, 2012 12:38 PM because
    Thursday, September 20, 2012 7:36 PM

All replies

  • Hi MaryTFS,

    To run Coded UI tests remotely, you need to configure your VM machine to be interact-able.

    If you have a test agent on that VM machine, you need to configure that test agent run as interactive process. In the Configure Test Agent dialog, click Run Options button->then select the Interactive process option.

    Or, you can log on that VM machine remotely, then run Coded UI tests on it.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 5:55 AM
  • Yes, my Test Agent is configured to run Interactive. 

    My question is - how should I create my snapshot to be used with an automated test which includes coded UI testing.  Should I be logged on to each VM within my VE, then take the snapshot?  Or should I not be logged on to each VM within my VE, then take the snapshot?

    I have tried both....neither works, but both give me different errors.  One complains that it can't run the test because the agent isn't logged on.  The other complains that it can't run because the user is already logged on.  ARGH !



    Monday, September 24, 2012 1:05 PM
  • Hi Mary,

    Thanks for your response.

    I think it is OK for you to create VM snapshot in the Virtual Environment. Be sure that when you create the snapshot, the status of the Testing capability is Ready. See: http://msdn.microsoft.com/en-us/library/ff427550.aspx

    If you still get errors with the offered steps that MSDN article listed, please show me the detailed error messages you got.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 26, 2012 5:54 AM