Support & information center

Using VNC

VNC can be used as an additional debugging tool that testRTC offers. It enables you to view how the browsers in a running test behave and to fix the test script accordingly.

What is VNC?

VNC stands for Virtual Network Computing. It is a desktop sharing system that is platform independent and mostly free to use.

You can setup a machine with a VNC server, and then using a VNC client connect to it remotely to control it as if you were sitting on that same machine.

Luckily for you, testRTC has support for VNC. Our testing probes can be configured to run with a VNC server, letting you connect to them remotely as a test is running and see firsthand what is going on. This is useful when troublehsooting the scripts while writing them or figuring out what is going on in your application in certain scenarios.

Using VNC in testRTC

Install VNC

You will need to have a VNC viewer installed on your machine. There are multiple such applications available in the web, and it would be best if you search on your own and find a VNC viewer you are comfortable with.

TightVNC and RealVNC are both good alternatives, although there are others as well.

Enable support for VNC

VNC isn’t enabled by default. The reason for that is that running it takes up resources from the probes – resources that are better used for your application testing when it is not needed.

To enable VNC support, you will first need to add #vnc as one of the run options of the test.

Run a test and find the VNC server

When a test is running, if VNC is enabled, then testRTC will try as best effort to run a VNC server on some of the machines in the test. If this is successful, then the Test Execution Status of the test itself will show something similar to this:

Note the blue VNC buttons next to some of the probes – if you click them, then the IP address of the VNC server for that probe will be stored in your PC’s clipboard and you will be able to use it in your VNC client.

The VNC session has by a password. The password is ‘secret’.

Important rules of thumb when using VNC

As a rule of thumb, don’t expect to see a VNC button in the following cases:

  • If #vnc isn’t set in the run options
  • If this is a scheduled monitor run
  • If there are multiple probes running concurrently in this test you will see VNC on just two probes
  • If VNC port resources on the physical machine are already allocated to other running tests – this may happen from time to time

Please Note that VNC takes up resources, and we can’t make it available on all running agents at once. Due to that, you may find that sometimes the VNC button doesn’t appear.

Q: Why isn’t there a VNC button when I run my test script?

A: VNC takes up resources, and we can’t make it available on all running agents at once. Due to that, you may find that sometimes the VNC button doesn’t exist.

Q: Why VNC stutters and disconnects for me

A: VNC is used for debugging purposes, so we don’t really optimize its use.

That said, there is one specific scenario in which you can expect VNC to work really bad – and that’s if you set the network configuration in a test to introduce packet loss. Since we configure the whole machine to simulate packet loss, the VNC connection on that machine suffers from the same problem.

Was this article helpful?

Related Articles