Merge lp:~veebers/autopilot/adding-run-instructions-readme into lp:autopilot

Proposed by Christopher Lee on 2015-01-21
Status: Merged
Approved by: Christopher Lee on 2015-01-22
Approved revision: 534
Merged at revision: 534
Proposed branch: lp:~veebers/autopilot/adding-run-instructions-readme
Merge into: lp:autopilot
Diff against target: 110 lines (+38/-9)
2 files modified
README (+29/-0)
docs/tutorial/running_ap.rst (+9/-9)
To merge this branch: bzr merge lp:~veebers/autopilot/adding-run-instructions-readme
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-01-22
Nicholas Skaggs (community) Needs Fixing on 2015-01-22
Thomi Richards (community) 2015-01-21 Approve on 2015-01-21
Review via email: mp+247088@code.launchpad.net

Commit Message

Adding details to README re: running/listing autopilot tests.

Description of the Change

Adding details to README re: running/listing autopilot tests.

To post a comment you must log in.
Thomi Richards (thomir) wrote :

please remove spurious whitespace changes, and fix one comment on awkward english.

review: Needs Fixing
Thomi Richards (thomir) :
review: Approve
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:532
http://jenkins.qa.ubuntu.com/job/autopilot-ci/980/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/43
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/43/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/43
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/43/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/43
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/43/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/893
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/57
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/784
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/891
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/891/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/17264
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/62
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/477
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/477/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/autopilot-ci/980/rebuild

review: Approve (continuous-integration)
Nicholas Skaggs (nskaggs) wrote :

See comments. So nice to have this info though!

review: Needs Fixing
review: Approve (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
Unapproved changes made after approval.
http://jenkins.qa.ubuntu.com/job/autopilot-autolanding/304/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-autolanding/21
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-autolanding/21/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-autolanding/21
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-autolanding/21/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-autolanding/21
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-autolanding/21/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/943
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/85
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/834
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/941
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/941/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/17370
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/85
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/513
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/513/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2015-01-20 03:33:54 +0000
3+++ README 2015-01-22 18:01:22 +0000
4@@ -44,6 +44,35 @@
5
6 $ xdg-open build/sphinx/html/index.html
7
8+
9+Running and Listing tests
10+=========================
11+
12+Normally running autopilot tests is as easy as::
13+
14+ $ autopilot3 run <test id>
15+
16+There are some complexities when attempting to run the autopilot tests from
17+within a development branch (this related to how autopilot modules are loaded
18+and then used to attempt to collect the required tests).
19+
20+For that reason when running autopilot's tests while hacking on it it is
21+advised to run autopilot in this manner::
22+
23+ $ python3 -m autopilot.run run autopilot.tests.unit
24+
25+Listing is similar::
26+
27+ $ python3 -m autopilot.run list autopilot.tests.unit
28+
29+For a more complete explanation for running or listing tests please see the
30+full documentation found here:
31+https://developer.ubuntu.com/api/devel/ubuntu-14.10/python/autopilot/tutorial/running_ap.html
32+
33+If you are in the root of the autopilot source tree this will run/list the tests from
34+within that local module. Otherwise autopilot will look in the system python path.
35+
36+
37 Release Manual Tests
38 ====================
39
40
41=== modified file 'docs/tutorial/running_ap.rst'
42--- docs/tutorial/running_ap.rst 2015-01-22 03:29:46 +0000
43+++ docs/tutorial/running_ap.rst 2015-01-22 18:01:22 +0000
44@@ -8,11 +8,11 @@
45
46 Autopilot can list all tests found within a particular module::
47
48- $ autopilot list <modulename>
49+ $ autopilot3 list <modulename>
50
51 where *<modulename>* is the base name of the module you want to look at. The module must either be in the current working directory, or be importable by python. For example, to list the tests inside autopilot itself, you can run::
52
53- $ autopilot list autopilot
54+ $ autopilot3 list autopilot
55 autopilot.tests.test_ap_apps.GtkTests.test_can_launch_qt_app
56 autopilot.tests.test_ap_apps.QtTests.test_can_launch_qt_app
57 autopilot.tests.test_application_mixin.ApplicationSupportTests.test_can_create
58@@ -39,7 +39,7 @@
59
60 Running autopilot tests is very similar to listing tests::
61
62- $ autopilot run <modulename>
63+ $ autopilot3 run <modulename>
64
65 However, the run command has many more options to customize the run behavior:
66
67@@ -70,19 +70,19 @@
68
69 1. **Run autopilot and save the test log**::
70
71- $ autopilot run -o . <modulename>
72+ $ autopilot3 run -o . <modulename>
73
74 Autopilot will create a text log file named <hostname>_<dd.mm.yyy_HHMMSS>.log with the contents of the test log.
75
76 2. **Run autopilot and record failing tests**::
77
78- $ autopilot run -r --rd . <modulename>
79+ $ autopilot3 run -r --rd . <modulename>
80
81 Videos are recorded as *ogg-vorbis* files, with an .ogv extension. They will be named with the test id that failed. All videos will be placed in the directory specified by the ``-rd`` option - in this case the currect directory. If this option is omitted, videos will be placed in ``/tmp/autopilot/``.
82
83 3. **Save the test log as jUnitXml format**::
84
85- $ autopilot run -o results.xml -f xml <modulename>
86+ $ autopilot3 run -o results.xml -f xml <modulename>
87
88 The file 'results.xml' will be created when all the tests have completed, and will be in the jUnitXml file format. This is useful when running the autopilot tests within a jenkins environment.
89
90@@ -94,18 +94,18 @@
91 In order to be able to introspect an application, it must first be launched with introspection enabled. Autopilot provides the **launch** command to enable this: ::
92
93 $ autopilot3 launch <application> <app_parameters>
94-
95+
96 The *<application>* parameter could be the full path to the application, or the name of an application located somewhere on ``$PATH``. *<app_parameter>* is passed on to the application being launched.
97
98 A simple Gtk example to launch gedit::
99
100 $ autopilot3 launch gedit
101
102-A Qt example which passes on parameters to the application being launched::
103+A Qt example which passes on parameters to the application being launched::
104
105 $ autopilot3 launch qmlscene my_app.qml
106
107-Autopilot launch attempts to detect if you are launching either a Gtk or Qt application so that it can enable the correct libraries. If it is unable to determine this you will need to specify the type of application it is by using the -i argument. This allows "Gtk" or "Qt" frameworks to be specified when launching the application. The default value ("Auto") will try to detect which interface to load automatically.
108+Autopilot launch attempts to detect if you are launching either a Gtk or Qt application so that it can enable the correct libraries. If it is unable to determine this you will need to specify the type of application it is by using the -i argument. This allows "Gtk" or "Qt" frameworks to be specified when launching the application. The default value ("Auto") will try to detect which interface to load automatically.
109
110 A typical error in this situation will be "Error: Could not determine introspection type to use for application". In which case the -i option should be specified with the correct application framework type to fix the problem::
111

Subscribers

People subscribed via source and target branches