Vasudeven, self.app is not an object. Have a look at some of the other
tests in the tree to see some examples of things. You use select_single
and select_multiple to grab dbus objects. Those can be moved to,
clicked, etc. Make sense?
Nicholas
On 06/06/2013 10:01 PM, Vasudevan Kottilil wrote:
Tried the changes and still seeing errors?
self.app is proxy returned from launch_test_application.
self.mouse.move_to_object(self.app)
ValueError: Object '<autopilot.introspection.dbus.Root object at
0x1a24b50>' does not have any recognised position attributes
On Thu, Jun 6, 2013 at 2:21 PM, Vasudevan Kottilil
<[email protected] <mailto:[email protected]>> wrote:
Thanks Nicholas, I can see NautilusDesktopWindow with GtkGrid,
GtkPaned and NautilusToolbar objects under that. Let me give it a
try and get back to you. Testcase for connecting to server will be
challenging...
Vasu
Vasudevan Kottilil
On Thu, Jun 6, 2013 at 2:04 PM, Nicholas Skaggs
<[email protected]
<mailto:[email protected]>> wrote:
Vasudevan, the autopilot folks have a solution for us. Check
this out:
http://pastebin.ubuntu.com/5740039/
Basically if we close down nautilus using the "nautilus -q"
command first, we can introspect nautilus. So this works for
example:
nautilus -q
autopilot launch nautilus
autopilot vis
See the paste for incorporating the idea into the test. Good luck!
Nicholas
On 05/31/2013 03:54 AM, Vasudevan Kottilil wrote:
Hi Nicholas,
Thanks - still getting errors within my dev env. Based on
brief conversation earlier on irc, I installed autopilot on
vm from ppa:autopilot/ppa. Is this the correct version for 1.3?
Got the latest version of test_nautilus from trunk and tried
to run it 'as is'. This is what I am getting now
Loading tests from: /home/test/autopilot
Tests running...
======================================================================
ERROR: tests.test_nautilus.NautilusTests.test_create_a_folder
----------------------------------------------------------------------
_StringException: traceback-1: {{{
Traceback (most recent call last):
File "/home/test/autopilot/tests/test_nautilus.py", line
32, in test_create_a_folder
self.keyboard.press_and_release("Ctrl+l")
File
"/usr/lib/python2.7/dist-packages/autopilot/testcase.py",
line 158, in keyboard
self.addCleanup(self._kb.cleanup)
AttributeError: 'Keyboard' object has no attribute 'cleanup'
}}}
Traceback (most recent call last):
File
"/usr/lib/python2.7/dist-packages/autopilot/utilities.py",
line 242, in action_on_test_start
obj.on_test_start(test_instance)
File
"/usr/lib/python2.7/dist-packages/autopilot/globals.py", line
108, in on_test_start
if _video_logger._enable_recording:
AttributeError: '_VideoLogger' object has no attribute
'_enable_recording'
Ran 1 test in 1.284s
FAILED (failures=1)
I still have issues with terminal display inside the vm and
it is not displaying cursor and commands typed with in it.
Was able to work around that by using a uxterm. Since some
of you are able to execute these scripts with 1.3, it looks
like some environment issues at my end...
Vasudevan
On Thu, May 30, 2013 at 7:51 AM, Nicholas Skaggs
<[email protected]
<mailto:[email protected]>> wrote:
Vasudevan, there is a basic nautilus testcase (very
basic!) that is now in the production branch. Can't wait
to see you expand it to test more :-)
Vasudevan, sounds like you want to use a tool called
testdrive:
https://wiki.ubuntu.com/UsingDevelopmentReleases
http://www.youtube.com/watch?v=JGZF6UHhl4I
Your workflow is exactly what happens in the canonical QA
lab everyday. The autopilot tests we're writing will be a
part of that. So for your testing however, you don't need
to install from an image everyday (unless you want to
test installation, in which case use testdrive above to
help!). So setup your vm and simply update on a regular
basis, just like your stable version of ubuntu. Your
installation will track the development release. You can
then use it to develop autopilot testcases or do manual
testing.
Does that help / make sense?
Nicholas
On 05/29/2013 06:55 PM, Vasudevan Kottilil wrote:
Hi Nicholas, Dan,
I am working on the nautilus script and was hoping to
make some progress by now but running into many
issues(sorry, could not work during the long weekend).
I had downloaded a daily build image for
saucy-desktop-amd64.iso on 05/23 and tried to create a
guest image using the following command: (host is
running 12.10 desktop)
virt-install --connect qemu:///system --virt-type kvm
--name saucy-alpha-vm --ram 4096 --disk
path=/var/lib/libvirt/images/saucy-desktop-vm,size=30
--graphics vnc --location
/home/vkottilil/Downloads/saucy-desktop-amd64.iso and it
throws an error
Starting install...
ERROR Could not find an installable distribution at
'/home/vkottilil/Downloads/saucy-desktop-amd64.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start saucy-alpha-vm
otherwise, please restart your installation.
What causes this error?
After this, I burned the iso to dvd and from that
location it was able to create a vm using the same tool
with option --cdrom /dev/sr0 instead of --location.
After launching guest, I am unable to see anything typed
out in the vm's terminal - tried changing the profile
settings with different color etc and still does not work.
I can ssh from the host to the vm. Is it possible to run
autopliot on the vm from ssh terminal - are there any x
server/display options?
I have heard of a totally different workflow this team
is using to test the daily image using testdrive - any
pointers to that would be great. Ideally it would be
great if we can run a predictable set of steps similar to
wget latestgood
create vm
spin it up
install autopilot
copy test scripts
run tests
tear down
Thanks,
Vasudevan Kottilil
On Tue, May 28, 2013 at 8:21 AM, Dan Chapman
<[email protected]
<mailto:[email protected]>> wrote:
Hi everyone,
just thought i would give a quick update on the
status of porting the autopilot test cases since the
last hackfest (check out the notes
http://pad.ubuntu.com/CFXkuLR7Lb) and what is
working/needs reviewing and testing.
*Firefox: *nskaggs completed this and is now merged
to the production branch. The test was converted to
using the ProcessManager class as introspecting
firefox was not possible.
*
Evince: *has been ported to 1.3 using introspection,
the test is working good and has been proposed for
merge. Currently it could still do with the open and
print dialogs being introspected, as it is still
currently using keyboard shortcuts to navigate. Also
i think this test case could be further expanded as
it still misses some features that can be introspected
Currently it tests
* Display pdf
* Enter & Exit fullscreen
* Show & Hide sidebar
* Rotate document
Maybe we could add tests for zoom, bookmark and
presentation features? Whats your thoughts?
*File-Roller: *ported to 1.3 using introspection and
has been proposed for merge. It is currently using
the archive created in the first test across all the
tests. So the tests are unable to be called and run
independently from each other. Could do with
modifying to make each test self contained.
I could not find a sane way to select/choose an
archive format so currently it works with whatever
your default archive is and collects the name of the
archive from the window title so can be deleted
successfully.
Anyone have any ideas on accessing the items in a
GtkComboBoxText control and getting the selected item?
*Gedit: *Letozaf has been working on this and has
proposed a merge.
*Nautilus: *Has been ported to 1.3 but unable to
introspect due to autopilot module not loading, So
currently using the ProcessManager. This test is
still very basic in that it just creates and deletes
a directory. As this is probably the most used
application on ubuntu it should probably have an
extensive test to match the current manual-test-case
as much as possible.
*Shotwell: *Still to be ported to autopilot 1.3
*Totem: *nskaggs is working on this.... I think??
*Screenshot:*when running autopilot launch
gnome-screenshot it automatically takes a screenshot
of the whole screen and loads on to the save
screenshot window. This is the same when just
running gnome-screenshot in the terminal. Is this a
bug i couldnt find a bug like this. Or is this the
default behaviour when launching it from terminal?
Also the same when lauching the application with
launch_test_application()
screenshot can be introspected but cannot get into
the main window to test taking different shots. This
needs looking into further.
*Terminal:*ported to 1.3 using ProcessManager, it
would be great to be able to introspect terminal in
the near future, get some more assertions in there
then, and remove alot of the keyboard calls. :) Like
navigating the preferences dialog etc.
It would be great if people could test the current
Production and Proposed tests to get feedback. So if
anyone has the time please fell free to test them.
Regards
Dan Chapman
**
--
Ubuntu-quality mailing list
[email protected]
<mailto:[email protected]>
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-quality
--
Ubuntu-quality mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-quality