[LDTP-Dev] Running LDTP tests in Xvfb
Nagappan Alagappan
nagappan at gmail.com
Wed Oct 24 12:04:52 PDT 2012
Hi Andres,
Unfortunately the underlying libraries doesn't work based on DISPLAY.
You can use either of the approach [1] or [2].
Thanks
Nagappan
[1] - http://ldtp.freedesktop.org/wiki/Executing_scripts_remotely
[2] - http://bazaar.launchpad.net/~nagappan/hudson-x11-guitest/head/files
On Wed, Oct 24, 2012 at 7:59 AM, Andres Riancho <andres.riancho at gmail.com>wrote:
> List,
>
> Sorry if this is a FAQ but I was unable to make it work. I want to
> run LDTP in Xvfb and I don't seem to find how to do it. I've read some
> documents [0][1] and tested extensively but found myself in a
> dead-end. This is what I'm doing:
>
> Console #1, start Xvfb:
> /usr/bin/Xvfb :2 -screen 0 1024x768x24 -fbdir /tmp
>
> Console #2, start helloworld.py application in :2:
> DISPLAY=:2 python helloworld.py
>
> Console #3, start VNC server on :2 to verify that helloworld.py is running:
> x11vnc -display :2 -shared -forever
>
> Connect to the VNC server and find that the window is there. Without
> window decoration, but it is there.
>
> Console #4, run sniff.py [2] on display :2:
> DISPLAY=:2 python sniff.py hello
>
> Expected result from the last command would be something that contains
> "frmhelloworld.py"; instead I see the list of windows that are in my
> working X (:0). In other words, getwindowlist [3] seems to be ignoring
> the DISPLAY environment variable. I've also tested this:
>
> export DISPLAY=localhost:2
> python sniff.py hello
>
> And I still get the same result. If, after the export I run "gedit",
> the text editor will appear on my Xvfb (which I'm watching using VNC).
>
> So, the question would be... how do I tell LDTP to "connect" / "run"
> in a different display? Is there any updated documentation on
> LDTP+Xvfb?
>
> Thanks,
>
> [0]
> http://ldtp.freedesktop.org/wiki/Howto_run_ldtp_inside_Xvfb_which_runs_in_xinit_session
> [1] http://mago.ubuntu.com/Documentation/RunningOnHudson
> [2]
> https://sourceforge.net/apps/trac/w3af/browser/branches/threading2/core/ui/gtkUi/tests/ldtp_wrapper/sniff.py?rev=6006
> [3] from ldtp import getwindowlist
>
> Regards,
> --
> Andrés Riancho
> Project Leader at w3af - http://w3af.org/
> Web Application Attack and Audit Framework
> Twitter: @w3af
> GPG: 0x93C344F3
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>
--
Cross platform GUI testing
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra
ATOMac - Mac GUI Automation tool - https://github.com/pyatom/pyatom
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20121024/a8fb9185/attachment.html>
More information about the LDTP-dev
mailing list