Hi Andres,<br><br><div class="gmail_quote">On Wed, Oct 24, 2012 at 6:31 PM, Andres Riancho <span dir="ltr"><<a href="mailto:andres.riancho@gmail.com" target="_blank">andres.riancho@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Nagappan,<br>
<br>
    Thanks for the quick reply, please read inline:<br>
<br>
On Wed, Oct 24, 2012 at 4:04 PM, Nagappan Alagappan <<a href="mailto:nagappan@gmail.com">nagappan@gmail.com</a>> wrote:<br>
> Hi Andres,<br>
><br>
> Unfortunately the underlying libraries doesn't work based on DISPLAY.<br>
<br>
    That sucks :(<br></blockquote><div><br></div><div>I mean to say a11y libraries, anyways you got what I try to convey :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
> You can use either of the approach [1]<br>
<br>
    Executing scripts remotely is not what I need, since I want to<br>
have the code under test and the LDTP test in the same workstation,<br>
ideally developers should be able to run these LDTP tests in their<br>
workstations before a commit.<br>
<br>
> or [2].<br>
<br>
    Hudson X11 is similar to what I've read in Mago's wiki, the<br>
a11yservice.py // a11yclient.py are basically a way to send commands<br>
from one context to the other. The client is run in the Hudson context<br>
and in which context does the service run? xinit?<br></blockquote><div><br></div><div>I created this for Mago project. Hudson runs as root user (atleast in Ubuntu). So, I need to create 2 different scripts, a11yservice.py will run as regular user and a11yclient.py will run as Hudson user.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    Do you see any possibility to run LDTP tests in xvfb? Is the a11y<br>
service/client the way?<br></blockquote><div><br></div><div>If a11yservice.py gets started when the Xvfb session starts, then you can run the test as you expect, by invoking your script with a11yclient.py.</div><div><br>

</div><div>Hope this helps.</div><div><br></div><div>Thanks</div><div>Nagappan</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
<br>
> Thanks<br>
> Nagappan<br>
><br>
> [1] - <a href="http://ldtp.freedesktop.org/wiki/Executing_scripts_remotely" target="_blank">http://ldtp.freedesktop.org/wiki/Executing_scripts_remotely</a><br>
> [2] - <a href="http://bazaar.launchpad.net/~nagappan/hudson-x11-guitest/head/files" target="_blank">http://bazaar.launchpad.net/~nagappan/hudson-x11-guitest/head/files</a><br>
><br>
> On Wed, Oct 24, 2012 at 7:59 AM, Andres Riancho <<a href="mailto:andres.riancho@gmail.com">andres.riancho@gmail.com</a>><br>
> wrote:<br>
>><br>
>> List,<br>
>><br>
>>     Sorry if this is a FAQ but I was unable to make it work. I want to<br>
>> run LDTP in Xvfb and I don't seem to find how to do it. I've read some<br>
>> documents [0][1] and tested extensively but found myself in a<br>
>> dead-end. This is what I'm doing:<br>
>><br>
>> Console #1, start Xvfb:<br>
>>     /usr/bin/Xvfb :2 -screen 0 1024x768x24 -fbdir /tmp<br>
>><br>
>> Console #2, start helloworld.py application in :2:<br>
>>     DISPLAY=:2 python helloworld.py<br>
>><br>
>> Console #3, start VNC server on :2 to verify that helloworld.py is<br>
>> running:<br>
>>     x11vnc -display :2 -shared -forever<br>
>><br>
>> Connect to the VNC server and find that the window is there. Without<br>
>> window decoration, but it is there.<br>
>><br>
>> Console #4, run sniff.py [2] on display :2:<br>
>>     DISPLAY=:2 python sniff.py hello<br>
>><br>
>> Expected result from the last command would be something that contains<br>
>> "frmhelloworld.py"; instead I see the list of windows that are in my<br>
>> working X (:0). In other words, getwindowlist [3] seems to be ignoring<br>
>> the DISPLAY environment variable. I've also tested this:<br>
>><br>
>>     export DISPLAY=localhost:2<br>
>>     python sniff.py hello<br>
>><br>
>> And I still get the same result. If, after the export I run "gedit",<br>
>> the text editor will appear on my Xvfb (which I'm watching using VNC).<br>
>><br>
>> So, the question would be... how do I tell LDTP to "connect" / "run"<br>
>> in a different display? Is there any updated documentation on<br>
>> LDTP+Xvfb?<br>
>><br>
>> Thanks,<br>
>><br>
>> [0]<br>
>> <a href="http://ldtp.freedesktop.org/wiki/Howto_run_ldtp_inside_Xvfb_which_runs_in_xinit_session" target="_blank">http://ldtp.freedesktop.org/wiki/Howto_run_ldtp_inside_Xvfb_which_runs_in_xinit_session</a><br>
>> [1] <a href="http://mago.ubuntu.com/Documentation/RunningOnHudson" target="_blank">http://mago.ubuntu.com/Documentation/RunningOnHudson</a><br>
>> [2]<br>
>> <a href="https://sourceforge.net/apps/trac/w3af/browser/branches/threading2/core/ui/gtkUi/tests/ldtp_wrapper/sniff.py?rev=6006" target="_blank">https://sourceforge.net/apps/trac/w3af/browser/branches/threading2/core/ui/gtkUi/tests/ldtp_wrapper/sniff.py?rev=6006</a><br>


>> [3] from ldtp import getwindowlist<br>
>><br>
>> Regards,<br>
>> --<br>
>> Andrés Riancho<br>
>> Project Leader at w3af - <a href="http://w3af.org/" target="_blank">http://w3af.org/</a><br>
>> Web Application Attack and Audit Framework<br>
>> Twitter: @w3af<br>
>> GPG: 0x93C344F3<br>
>> _______________________________________________<br>
>> LDTP-dev mailing list<br>
>> <a href="mailto:LDTP-dev@lists.freedesktop.org">LDTP-dev@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> Cross platform GUI testing<br>
> Linux Desktop (GUI Application) Testing Project -<br>
> <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br>
> Cobra - Windows GUI Automation tool - <a href="https://github.com/ldtp/cobra" target="_blank">https://github.com/ldtp/cobra</a><br>
> ATOMac - Mac GUI Automation tool - <a href="https://github.com/pyatom/pyatom" target="_blank">https://github.com/pyatom/pyatom</a><br>
> <a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a><br>
><br>
<br>
<br>
<br>
--<br>
Andrés Riancho<br>
Project Leader at w3af - <a href="http://w3af.org/" target="_blank">http://w3af.org/</a><br>
Web Application Attack and Audit Framework<br>
Twitter: @w3af<br>
GPG: 0x93C344F3<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Cross platform GUI testing</div>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br>

Cobra - Windows GUI Automation tool - <a href="https://github.com/ldtp/cobra" target="_blank">https://github.com/ldtp/cobra</a><div>ATOMac - Mac GUI Automation tool - <a href="https://github.com/pyatom/pyatom" target="_blank">https://github.com/pyatom/pyatom</a></div>

<div><a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a></div><br>