Running GUI test on agent

The Pulse Support forums are here so that you can ask questions or leave comments related to pulse. They are watched by Zutubi staff who will endeavour to answer your questions promptly.

Running GUI test on agent

Postby scoobydoo on Fri Mar 25, 2016 2:14 am

As part of my build i'm running some tests. The tests are triggered via an executable build recipe command which runs a script. The non GUI tests run fine but when i get to the GUI test it's always failing with;

No protocol specified
Could not connect to display :0

Can't figure out how to get around this. I'm sure there must be an easy way to start a GUI test.
scoobydoo
 
Posts: 28
Joined: Tue Oct 14, 2014 6:39 pm

Re: Running GUI test on agent

Postby jason.sankey on Mon Mar 28, 2016 2:52 am

Hi,

Do you have an X server running on the agent? If the machine is just booted with a Pulse agent service run from an init script (or via systemd or upstart), usually no X server would be available for GUI programs. One way to solve this is to run Xvfb, see this blog post of ours:

http://www.alittlemadness.com/2008/03/0 ... -headless/

for details (warning: it might be a bit dated). The nice thing about Xvfb is it works even if you are using a headless setup, i.e. you don't need a monitor attached to the agent.

If you have an Xserver running but still see this error than it could be a configuration or permission issue -- your environment might not specify a correct XAUTHORITY, or the Xserver may be rejecting connections from the Pulse user.

Cheers,
Jason
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm

Re: Running GUI test on agent

Postby scoobydoo on Sat Apr 02, 2016 2:42 am

Jason,

Thanks for your reply. I ended up connecting to the remote machine over SSH and passing the DISPLAY variable to SSH
E.g. ssh -X <IP> 'export DISPLAY:=0.0; mycommand.sh'
scoobydoo
 
Posts: 28
Joined: Tue Oct 14, 2014 6:39 pm

Re: Running GUI test on agent

Postby jason.sankey on Mon Apr 04, 2016 12:17 am

Glad you got it running, and thanks for following up.
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm


Return to Pulse Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron