[LDTP-Dev] LDTP 1.7.1 on Ubuntu 8.10?

Zhang, Wei Z wei.z.zhang at intel.com
Tue Dec 1 18:32:10 PST 2009


Hi, Nagappan, I'm afraid the data I provided has something wrong, I should update the data:
For the code:
from ldtp import *

o = getobjectlist('*-gedit')
for i in o:
   try:
      print getobjectproperty('*-gedit', i, 'label')
   except:
      pass

With ldtp, it actually cost less than 5s even on my low performance netbook,
The last time I might give one data from ldtp2 too. :)

So, the ldtp2 seems to have some regression on getobjectproperty etc. Hope for the enhancement. :)
BTW, how about to add uninstall for ldtp2 ?  So that, it's easy to switch between ldtp and ldtp2, Actually I've made the mistaken data  by my lazy that not to uninstall ldtp2 manually before I tried ldtp :)



From: Zhang, Wei Z
Sent: Wednesday, November 18, 2009 10:33 AM
To: 'Nagappan Alagappan'
Cc: Wang Qi, Scott; ldtp-dev at lists.freedesktop.org
Subject: RE: [LDTP-Dev] LDTP 1.7.1 on Ubuntu 8.10?

Thanks for your information, Nagappan. :P


From: Nagappan Alagappan [mailto:nagappan at gmail.com]
Sent: Tuesday, November 17, 2009 9:16 PM
To: Zhang, Wei Z
Cc: Wang Qi, Scott; ldtp-dev at lists.freedesktop.org
Subject: Re: [LDTP-Dev] LDTP 1.7.1 on Ubuntu 8.10?

Hi Wei,
On Mon, Nov 16, 2009 at 10:30 PM, Zhang, Wei Z <wei.z.zhang at intel.com<mailto:wei.z.zhang at intel.com>> wrote:
Nagappan:
It's very strange that your VM is faster than my PC(2G memory and IntelCoreDuo 2.66GHz)... :D .   It might be some difference on number of gedit's objects, there're 399 objects in my gedit.
Guess you are trying with LDTP 1.7.1 release ? If older release, request to switch to newer one. I generally verify things with git head.

On Ubuntu 9.10, just the default gedit shows 377 object.

For LDTPv1, Does it runtime search in one hierarchy structure when it received request of getobjectproperty? For the whole AT system, which part consume the time mostly?
And I'm very curious of the performance in LDTPv2 too..
In LDTPv2 object property are queried at run-time and so the performance is too slow. I'm working on appmap branch in LDTPv2 which seems to be much better

real    0m39.709s
user    0m0.124s
sys    0m0.972s

Regular head version just gets the info from accessibility stack each time, we request the object info, the appmap branch, just pokes the window once (same as LDTPv1) and then just use that info, unless the object info currently misses on performing some action / verification. In that case, the complete hierarchy will be poked once again and all the info will be maintained locally.
Actually I've tried one dump tree for LDTPv1, but it'll cost much time to get all objects' info that disturbed me a lot :)
Ya, I understand this. I remember  James Tatum reported the same issue earlier, when he was writing an UI.

Let me check, how we can improve the performance on this.

Thanks
Nagappan

From: Nagappan Alagappan [mailto:nagappan at gmail.com<mailto:nagappan at gmail.com>]
Sent: Tuesday, November 17, 2009 2:00 PM
To: Zhang, Wei Z
Cc: Wang Qi, Scott; ldtp-dev at lists.freedesktop.org<mailto:ldtp-dev at lists.freedesktop.org>

Subject: Re: [LDTP-Dev] LDTP 1.7.1 on Ubuntu 8.10?

Hi Wei,

On my Ubuntu 9.10 VM with 800 MB memory, I get this performance, for this test:

from ldtp import *

o = getobjectlist('*-gedit')
for i in o:
   try:
      print getobjectproperty('*-gedit', i, 'label')
   except:
      pass

real    0m41.384s
user    0m0.128s
sys    0m0.408s

I prefer to do test on some action / verification and see how it performs :)

BTW, on LDTPv2, the performance seems to be too slow :D

real    4m29.893s
user    0m0.116s
sys    0m1.196s

Thanks
Nagappan
On Mon, Nov 16, 2009 at 9:25 PM, Zhang, Wei Z <wei.z.zhang at intel.com<mailto:wei.z.zhang at intel.com>> wrote:
Hi, Nagappan:
       I've still used LDTPv1 and I found the performance on getobjectproperty/getobjectinfo... is related with level of the object. when I tried to get all labels of one window's object by getobjectproperty, I found it becomes slower with the object's level increasing.
Take gedit for example, It used about 1m30s to list all object's label on my desktop PC.
My test is quite easy:
for o in getobjectlist('frm*gedit*')
print getobjectproperty('frm*gedit*', o, 'label')

       So, If there will be enhancement on it with LDTPv2? Hopefully it could be some workaround on LDTPv1 :)


From: ldtp-dev-bounces at lists.freedesktop.org<mailto:ldtp-dev-bounces at lists.freedesktop.org> [mailto:ldtp-dev-bounces at lists.freedesktop.org<mailto:ldtp-dev-bounces at lists.freedesktop.org>] On Behalf Of Nagappan Alagappan
Sent: Tuesday, November 17, 2009 10:03 AM
To: Wang Qi, Scott
Cc: ldtp-dev at lists.freedesktop.org<mailto:ldtp-dev at lists.freedesktop.org>
Subject: Re: [LDTP-Dev] LDTP 1.7.1 on Ubuntu 8.10?

Hi Scott,

After VMware Workstation 7.0 got released, I feel that I could spend little bit more time on LDTPv2. Will start fixing the missing API in this list http://lists.freedesktop.org/archives/ldtp-dev/2009-October/000912.html and once things are ready, let us go with the release. LDTPv2 release should be by December '09 !

Thanks
Nagappan
On Mon, Nov 16, 2009 at 5:00 PM, Wang Qi, Scott <wangqi.s at gmail.com<mailto:wangqi.s at gmail.com>> wrote:
Hi, Nagappan,

I read the annoucement http://lists.freedesktop.org/archives/ldtp-dev/2009-October/000902.html

When will LDTPv2 offically released :)? Any detailed feature list for it available now?

Thanks
Scott

On Tue, Nov 17, 2009 at 12:15 AM, Nagappan Alagappan <nagappan at gmail.com<mailto:nagappan at gmail.com>> wrote:
Hi Scott,

In VMware, we run our test regularly on Ubuntu 8.04 and 9.04, near about 1500 tests on weekly basis using LDTP, we haven't faced any such issue. On Ubuntu 8.10, we have noticed this https://bugzilla.gnome.org/show_bug.cgi?id=561631 But it seems your bug is different. On 9.04, we use LDTPv2.

I don't have an answer for this now :) Need to run the test on Ubuntu 8.10.

Thanks
Nagappan
On Mon, Nov 16, 2009 at 3:30 AM, Wang Qi, Scott <wangqi.s at gmail.com<mailto:wangqi.s at gmail.com>> wrote:
Hi, Nagappan,

I spent more time on my issue. My workflow is as follows.

1) application is lauched and waittillguiexist()
2) perform tests
3) application is closed and waittillguinotexist() to wait for the app to quit completely.

Then mago tests  is repeated for the above 3 steps.

On FC10 X64 and U8.10 IA32, LDTP will always trow a exception after step 3. It seems that when the application quit, somehow the LDTP backend also go unstable. But this case never occurs on Ubuntu 9.04. Do you happen to came across this kind of issue before?



Thank you for the time!
Scott

Btw, I just realized that I made a mistake in the following code example. I should wait for a while to allow the gedit to quit completely.
On Mon, Nov 16, 2009 at 4:01 PM, Wang Qi, Scott <wangqi.s at gmail.com<mailto:wangqi.s at gmail.com>> wrote:
Hi Nagappan,

I installed LDTP 1.7.1 (below URL) on Ubuntu 8.10 .

http://download.opensuse.org/repositories/home:/anagappan/xUbuntu_8.10/

I tried to run the below scripts on U8.10 after installation. I always found a exception after runing the smoke_ldtp() after the first round. Is the LDTP 1.7.1 tested intensively on U8.10?

Thanks
Scott

~$ python ldtp_smoke_with_gedit.py
i is 0
GTK Accessibility Module initialized
i is 1
GTK Accessibility Module initialized

(gedit:16481): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed
Traceback (most recent call last):
  File "ldtp_smoke_with_gedit.py", line 30, in <module>
    smoke_ldtp()
  File "ldtp_smoke_with_gedit.py", line 20, in smoke_ldtp
    settextvalue(WNAME, 'txt1', 'hello world')
  File "/var/lib/python-support/python2.5/ldtp.py", line 858, in settextvalue
    raise LdtpExecutionError (_responseStatus [1])
ldtplib.ldtplibutils.LdtpExecutionError: u'Window does not exist'






# Below is the content for ldtp_smoke_with_gedit.py
# This script will simply test the installation of LDTP and all
# necessary components on a newly installed system.
# 1) Close all all instances of gedit before calling this script
# 2) This scripts works on Ubuntu 9.0.4.

from ldtp import *

# Sometimes, '*gedit*' does not works.
WNAME = '*gedit'

def smoke_ldtp():

    launchapp('gedit')
    waittillguiexist(WNAME, guiTimeOut=3)

    # On Ubuntu 9.0.4, the text area is named as 'txt1'.
    # It could be 'txt0' or other value on other platform.
    # Please use the inspection tool such as "accerciser"
    # to check out.
    settextvalue(WNAME, 'txt1', 'hello world')

    selectmenuitem(WNAME, 'mnuFile;mnuQuit')

    waittillguiexist('dlgQuestion')

    click('dlgQuestion', 'btnClosewithoutSaving')
       #waittillguinotexist(WNAME, guiTimeOut=5) # waittillguinotexist() will cause a time-out exception on  FC10-X64 or Ubutun 8.10.

for i in xrange(10):
    print "i is %d" %i
    smoke_ldtp()

_______________________________________________
LDTP-dev mailing list
LDTP-dev at lists.freedesktop.org<mailto:LDTP-dev at lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev



--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com




--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com



--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com



--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20091202/d70072e8/attachment.html 


More information about the LDTP-dev mailing list