Merge lp:~thomir/autopilot/trunk-add-troubleshooting-docs into lp:autopilot

Proposed by Thomi Richards on 2015-01-21
Status: Merged
Approved by: Christopher Lee on 2015-01-21
Approved revision: 531
Merged at revision: 531
Proposed branch: lp:~thomir/autopilot/trunk-add-troubleshooting-docs
Merge into: lp:autopilot
Prerequisite: lp:~thomir/autopilot/trunk-fix-vis-section
Diff against target: 46 lines (+34/-3)
1 file modified
docs/faq/troubleshooting.rst (+34/-3)
To merge this branch: bzr merge lp:~thomir/autopilot/trunk-add-troubleshooting-docs
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration 2015-01-21 Approve on 2015-01-22
Christopher Lee (community) Approve on 2015-01-21
Richard Huddie (community) Needs Fixing on 2015-01-21
Leo Arias build the docs, read them. 2015-01-21 Approve on 2015-01-21
Review via email: mp+247093@code.launchpad.net

This proposal supersedes a proposal from 2015-01-21.

Commit Message

Document various debugging techniques.

Description of the Change

Add some information around debugging techniques.

To post a comment you must log in.
Leo Arias (elopio) wrote :

Thanks.

review: Approve (build the docs, read them.)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:528
http://jenkins.qa.ubuntu.com/job/autopilot-ci/981/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/44
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/44/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/44
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/44/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/44
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/44/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/896
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/59
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/787
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/894
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/894/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/17269
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/64
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/479
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/479/artifact/work/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:528
http://jenkins.qa.ubuntu.com/job/autopilot-ci/982/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/45
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/45/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/45
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/45/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/45
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/45/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/61
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/789
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/896
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/896/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/17271
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/66
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/482
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/482/artifact/work/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Richard Huddie (rhuddie) wrote :

Looks good, only a couple of minor points.

review: Needs Fixing
529. By Thomi Richards on 2015-01-21

Clean up code from review.

530. By Thomi Richards on 2015-01-21

Fix english.

Christopher Lee (veebers) wrote :

Looking good, just one minor question there.

review: Needs Fixing
531. By Thomi Richards on 2015-01-21

Fix english.

Christopher Lee (veebers) wrote :

sweet, LGTM.

review: Approve
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:529
http://jenkins.qa.ubuntu.com/job/autopilot-ci/987/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/50
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-amd64-ci/50/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/50
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-armhf-ci/50/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/50
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-vivid-i386-ci/50/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/915
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/66
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/806
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/913
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/913/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/17311
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/71
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/490
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/490/artifact/work/output/*zip*/output.zip

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

review: Approve (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 'docs/faq/troubleshooting.rst'
2--- docs/faq/troubleshooting.rst 2015-01-21 05:28:45 +0000
3+++ docs/faq/troubleshooting.rst 2015-01-21 22:08:49 +0000
4@@ -4,9 +4,40 @@
5
6 .. contents::
7
8--------------
9-Failing Tests
10--------------
11+.. _troubleshooting_general_techniques:
12+
13+------------------
14+General Techniques
15+------------------
16+
17+The single hardest thing to do while writing autopilot tests is to understand the state of the application's object tree. This is especially important for applications that change their object tree during the lifetime of the test. There are three techniques you can use to discover the state of the object tree:
18+
19+**Using Autopilot Vis**
20+
21+The :ref:`Autopilot vis tool <visualise_introspection_tree>` is a useful tool for exploring the entire structure of an application, and allows you to search for a particular node in the object tree. If you want to find out what parts of the application to select to gain access to certain information, the vis tool is probably the best way to do that.
22+
23+**Using print_tree**
24+
25+The :meth:`~autopilot.introspection.ProxyBase.print_tree` method is available on every proxy class. This method will print every child of the proxy object recursively, either to ``stdout`` or a file on disk. This technique can be useful when:
26+
27+* The application cannot easily be put into the state required before launching autopilot vis, so the vis tool is no longer an option.
28+* The application state that has to be captured only exists for a short amount of time.
29+* The application only runs on platforms where the vis tool isn't available.
30+
31+The :meth:`~autopilot.introspection.ProxyBase.print_tree` method often produces a lot of output. There are two ways this information overload can be handled:
32+
33+#. Specify a file path to write to, so the console log doesn't get flooded. This log file can then be searched with tools such as ``grep``.
34+#. Specify a ``maxdepth`` limit. This controls how many levels deep the recursive search will go.
35+
36+Of course, these techniques can be used in combination.
37+
38+**Using get_properties**
39+
40+The :meth:`~autopilot.introspection.ProxyBase.get_properties` method can be used on any proxy object, and will return a python dictionary containing all the properties of that proxy object. This is useful when you want to explore what information is provided by a single proxy object. The information returned by this method is exactly the same as is shown in the right-hand pane of ``autopilot vis``.
41+
42+----------------------------------------
43+Common Questions regarding Failing Tests
44+----------------------------------------
45
46 .. _failing_tests:
47

Subscribers

People subscribed via source and target branches