Forum Discussion

cam_farineau's avatar
cam_farineau
Contributor
8 years ago

Screen resolution of a VM using RDP with TestComplete

Hi,

 

To test our desktop application we have a Master project that runs the Slave project on different VMs.

We are using TeamCity to start our tests. On a TestManagement machine (VM) we have a Build Agent that is running as Service. This Build Agent starts the Master project with TestExecute.


This project connects with RDP to different VM to run our UI Tests (Slave project) of our App. We are using Network Suite and run our tests on Hosts (VMs) like it is suggest here: Using Network Suite.

 

But we have an issue with the screen resolution that is used to run our UI Tests. The resolution is too low.

This page Running tests via RDP  gives an explanation:

"When running tests on a remote computer that participates in distributed testing, TestComplete creates a Remote Desktop session and automatically sets the master computer's screen resolution on the remote computer. This is done to avoid possible problems with test running."

 

So TestExecute will use the master computer's screen resolution.

But TeamCity Agent is run as a service on a VM (TestManagement machine) and there is no screen resolution because it's an headless machine and not like a real user that will connect with RDP to this VM and start the Master Project.

 

I assume TestExecute will then use the default screen resolution (something like 640x480) as the resolution for the RDP connection. But this is too low to run our tests, some object are not on the screen and we have many issues...

 

Is there a way to change the resolution used by the RDP connection that TestExecute / TestComplete will create ? 
The tricky part is that the Master project is started from a service on an headless machine...

 

Thank you for your answers,

 

Camille

9 Replies

  • You can define the resolution a Virtual Machine (thinks it) runs at. Although they are headless machines, they still have a virtual display if set up that way.

     

    but how you configure it will depend on the VM system you're using. But I've altered the (virtual) resolution on VM's by VMWare and HyperV before with no issues.

  • Use 1024 * 768 resolution is Standard for Testing Application in any RDP

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      karthick7 wrote:

      Use 1024 * 768 resolution is Standard for Testing Application in any RDP


      Not sure there is, exactly, a "standard".  I used to run test automation on 800X600 boxes and it worked fine.  The 640X480 might work for certain situations, even.  For example, self-service Kiosks used to have their OS set to 640X480 because the screens were small so test automation needed to run in those environments.

       

      Whatever resolution is NEEDED for the specific application, that's what needs to be set. Colin_McCrae's solution is a good one.  Of course, depending upon the underlying infrastructure, there may be different ways of achieving the same result.

      • cam_farineau's avatar
        cam_farineau
        Contributor

        We are investigating this solution. (This is not so perfect for us because we are not the team in charge of this VM)

        We tried also to modify the default resolution directly through registry; without success. It seems that this default resolution (1024x768) is set by Hyper-V, and the session of the TeamCity agent will use that as it's current (virtual) resolution.


        Create manually a remote desktop connection and start the tests with TE using Network Suite and Manual mode is not possible also for us... 

         

        Is there any way to change someting in TestComplete settings to change the resolution used while creating the RDC (Network Suite and Automatic Mode) ? 
        There is also default config file use by RDC (Default.rdp in User\Documents) where you can put default settings for the connection, is this possible to provide or to modify the one used by TestComplete ?

        We don't know exactly how TestComplete is creating the remote desktop connection, I'm assuming it's using mstsc.

        If we can provide display settings for this RDC it would be perfect.