Forum Discussion

katasonov's avatar
katasonov
Occasional Contributor
14 years ago

How to run GUI test with Remotedesktop?

Hi!



I have test computer with installed TestComplete. I do remote connection with Remotedesktop to test computer and start GUI tests. While remotedesktop session's window is opened everything is Ok, but if I switch to my home computer's desktop I have following errors: "The window is invisible and cannot be activated" and then  tests are failed.



How to run GUI tests with Remotedesktop and do not hold session's window opened all the time?



Regards,

Alex.

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Alex,



    This is not possible because of the way how Remote Desktop is implemented. You either must keep RDP window open until the test ends or use some other software (usually incompatible with RDP) that makes it possible to minimize the remote window (e.g. NetOp).
  • Hi Alexander,



    How to run GUI tests with Remotedesktop and do not hold session's window opened all the time?



    Alexei is right. Let me quote the Running Tests via Remote Desktop help topic:
     



    When running the GUI tests via the Remote Desktop, do not minimize the Remote Desktop window. When the Remote Desktop window is minimized, the operating system does not draw the GUI so TestComplete will not be able to “see” the tested application’s interface and thus will fail to interact with it.



    For the same reason, do not disconnect from the Remote Desktop Connection session or lock the current computer while running tests that interact with the GUI, otherwise the tests will fail.

     



    As an alternative, you may consider using Network Suites. For example, on your computer (the computer you currently open RD connection to the test computer), create a project that you're going to run on the test computer, set up a task, share the project suite folder with the test computer, execute the task. While the task is being executed, you can minimize TC, and your test will be played back on the test PC.
     



    To help you get started with Network Suites, I recommend that you follow this tutorial.
  • katasonov's avatar
    katasonov
    Occasional Contributor
    Thank you guys!



    I just hold my RD window opened for now. For me it's not convinient way to use my work computer for TestComplete, thats why we have special test computer with installed TC.



    Regards,

    Alex
  • Alex,



    I run all my tests on virtual machines. When I remote desktop into the VM, I can start the tests then switch back to my host computer. It's worked like a charm for me.



    Good luck,



    Chuck