[LDTP-Dev] Running LDTP tests in Xvfb

Andres Riancho andres.riancho at gmail.com
Wed Oct 24 18:31:10 PDT 2012


Nagappan,

    Thanks for the quick reply, please read inline:

On Wed, Oct 24, 2012 at 4:04 PM, Nagappan Alagappan <nagappan at gmail.com> wrote:
> Hi Andres,
>
> Unfortunately the underlying libraries doesn't work based on DISPLAY.

    That sucks :(

> You can use either of the approach [1]

    Executing scripts remotely is not what I need, since I want to
have the code under test and the LDTP test in the same workstation,
ideally developers should be able to run these LDTP tests in their
workstations before a commit.

> or [2].

    Hudson X11 is similar to what I've read in Mago's wiki, the
a11yservice.py // a11yclient.py are basically a way to send commands
from one context to the other. The client is run in the Hudson context
and in which context does the service run? xinit?

    Do you see any possibility to run LDTP tests in xvfb? Is the a11y
service/client the way?

Regards,

> 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
>



-- 
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