Integration tests can be difficult to debug, in particular when running on a remote machine. We recommend two options for debugging your browser-based tests on Scrutinizer.
Each build can generate build artifacts which we will persist when tearing down the VM. This allows you to save screenshots as part of your build, and to view them when your build finishes.
Saving screenshots is a built-in feature in webkit and Selenium, and supported by most test runners:
Simply save the screenshots to the
~/artifacts directory, and we will pick them up automatically.
You can view your UI tests right in your browser, when running an SSH debug session.
As soon as the test container is prepared, a Display tab opens on the right side:
VNC allows you to view and interact with the browser that is running your tests. Setting this up is simple:
In order to reach the VM, start your build in SSH debug mode so that we can establish an SSH connection.
Next, we need to forward the VNC server port
5902 of the VM to a port of your local machine (we use port
ssh -p PORT [email protected]_ADDRESS -L 5902:localhost:5901
Make sure to replace
IP_ADDRESS with the information displayed on the build page.
Last, start the VNC server on the VM:
vnc4server -geometry 1280x1024 -depth 24; export DISPLAY=:1.0
login123as we have already secured the connection via SSH.
We recommend installing the RealVNC viewer which is available on most platforms, but you can use any VNC viewer basically.
Once installed, we can connect with the viewer to
Then, you can run your tests on the remote machine and watch your browser via VNC just as if it were running on your local machine.