[LDTP-Dev] Running LDTP tests in Xvfb

Andres Riancho andres.riancho at gmail.com
Wed Oct 24 07:59:33 PDT 2012


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


More information about the LDTP-dev mailing list