Forum Discussion

jorgesimoes1983's avatar
jorgesimoes1983
Regular Contributor
10 years ago

Project Runs depend on monitor connected to computer

In our work environment we have several machines with TestComplete, some of which do not have any monitor connected to the computer.



It seems that TestComplete does not work correctly if there isn't any monitor connected to the computer. Does anyone have any information/workaround regarding this subject?



In this context, most of the testes fail, because they cannot find the page elements.



Thank you!

4 Replies

  • chrisb's avatar
    chrisb
    Regular Contributor
    With the monitor disconnected Windows is running headless and doesn't render the desktop. A common way to work around this when GUI testing is to create a console session with your machine and leave it open.

    You can use something like VNC server running on the testing machine and leave a connection open to your testing machine. My preferred method is to run tests on virtual machines and use the vm software to keep a session open with the machine. You could also make RDP connections from a PC to your testing machines and leave the window minimized as per these instructions: http://support.smartbear.com/viewarticle/56551/. IMO leaving a session open using VNC or virtual machine tools works way better for long term testing on remote machines.

    This article explains it well: http://autumnator.wordpress.com/2011/11/18/how-to-run-remote-headless-gui-automation/
  • jorgesimoes1983's avatar
    jorgesimoes1983
    Regular Contributor
    I've been using the RDP connections solutions, but lately I started using tightVNC and it's the solution I prefer.



    Although, I noticed, that if the computer hasn't a monitor attached, TestComplete doesn't work correctly.



    In conclusion, if I have 7 computers and only a monitor attached to one of the computers only the one which has the monitor attached works fine. The other six... are useless, because neither RDP or VNC do the trick.



    Am I correct?



    I am closing, the VNC window, perhaps that's the problem?
  • chrisb's avatar
    chrisb
    Regular Contributor
    Do you have VNC set correctly to keep the session open when you close the window? I'd take a look at VNC settings.