Merge lp:~canonical-ci-engineering/ubuntu-test-cases/testing-docs into lp:ubuntu-test-cases/touch

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 378
Merged at revision: 376
Proposed branch: lp:~canonical-ci-engineering/ubuntu-test-cases/testing-docs
Merge into: lp:ubuntu-test-cases/touch
Diff against target: 120 lines (+84/-1)
1 file modified
README-cli.rst (+84/-1)
To merge this branch: bzr merge lp:~canonical-ci-engineering/ubuntu-test-cases/testing-docs
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Paul Larson Approve
Thomi Richards (community) Approve
Review via email: mp+251507@code.launchpad.net

This proposal supersedes a proposal from 2015-03-02.

Commit message

Add README documentation for developer centric testing of a modified debian or click application.

Description of the change

Add README documentation for developer centric testing of a modified debian or click application.

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote : Posted in a previous version of this proposal

I've also been playing with a modified version oh phablet-click-test-setup (from phablet-tools) which takes care of installation of the test sources and would allow removing the following:

33 +The above phablet-click-test-setup command will install the standard test
34 +dependencies and the click application's test sources as specified in the
35 +manifest. This is usually the application's trunk branch. To override the test
36 +sources with local changes, replace the test sources that were copied to the
37 +device. This example assumes the application code is checked out under the
38 +'dropping-letters' directory with the test sources under 'tests/autopilot'::
39 +
40 + adb shell rm -rf /home/phablet/autopilot/dropping_letters_app
41 + adb push dropping-letters/tests/autopilot \
42 + /home/phablet/autopilot

Revision history for this message
Paul Larson (pwlars) wrote : Posted in a previous version of this proposal

is pkcon preferred over click install?

Revision history for this message
Francis Ginther (fginther) wrote : Posted in a previous version of this proposal

> is pkcon preferred over click install?

I've been unable to find info in any of the wiki's but the 'click' command provides this:
"
phablet@ubuntu-phablet:~$ click install --help
Usage: click install [options] PACKAGE-FILE

This is a low-level tool; to install a package as an ordinary user
you should generally use "pkcon install-local PACKAGE-FILE"
instead.
"

Will keep looking.

Revision history for this message
Colin Watson (cjwatson) wrote : Posted in a previous version of this proposal

The click documentation should be considered authoritative on this.

377. By Francis Ginther

A couple of minor corrections and updates.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Found a typo

review: Needs Fixing
Revision history for this message
Francis Ginther (fginther) wrote :

> Found a typo

plars fixed this in rev 377.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

That looks better then.

review: Approve
378. By Paul Larson

Add a section on running tests for a modified debian package

Revision history for this message
Paul Larson (pwlars) wrote :

This now has the debian package testing instructions merged, and I think that's all we were intending to add. So there was something else, I'm +1 to go ahead and merge this in.

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

Also approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README-cli.rst'
2--- README-cli.rst 2014-11-10 19:28:56 +0000
3+++ README-cli.rst 2015-03-03 13:54:49 +0000
4@@ -6,10 +6,11 @@
5 things you need are:
6
7 * This bzr branch
8- * The phablet-tools_ package
9+ * The phablet-tools_ and ubuntu-device-flash_ packages
10 * An Ubuntu Touch supported_ device
11
12 .. _phablet-tools: http://launchpad.net/phablet-tools
13+.. _ubuntu-device-flash: http://launchpad.net/goget-ubuntu-touch
14 .. _supported: http://wiki.ubuntu.com/Touch/Devices
15
16 There are two pieces to touch testing, provisioning and test execution. These
17@@ -27,10 +28,20 @@
18
19 will list supported options.
20
21+Provisioning using this script requires that you start off with the
22+device booted and accessible via ADB. The device will be rebooted
23+automatically and completely reinstalled - ALL DATA WILL BE LOST.
24+
25 NOTE: provision.sh requires a path to a network-manager wifi connection that
26 can be copied to the target device. By default this is set to
27 ${HOME}/.ubuntu-ci/wifi.conf. This can be overridden with the -n parameter.
28
29+By default, the latest devel-proposed image will be installed. If you
30+wish to install the latest ubuntu-rtm image instead, use::
31+
32+ export IMAGE_OPT="--bootstrap --developer-mode --channel=ubuntu-touch/ubuntu-rtm/14.09-proposed"
33+ ./scripts/provision.sh -w
34+
35 Executing Tests
36 ---------------
37
38@@ -52,6 +63,10 @@
39 These sub-directories include a xUnit XML formatted file, *test_results.xml*,
40 as well as several log files from the device to help with debugging failures.
41
42+NOTE: run-autopilot-tests.sh will call a script that installs
43+unity8-autopilot if it is not already installed, to allow the device to
44+be unlocked automatically.
45+
46 An example testing two applications::
47
48 ./scripts/run-autopilot-tests.sh -a dropping_letters_app -a music_app
49@@ -96,3 +111,71 @@
50 Then execute the following script::
51
52 ./scripts/run-mp.sh
53+
54+Running Tests for a Modified Click Application
55+----------------------------------------------
56+
57+First provision the device with the desired image using the instructions
58+in the "Provisioning" section of this README.
59+
60+Once the image has been provisioned, install the click app to test.
61+The dropping-letters application is used in this example::
62+
63+ adb push com.ubuntu.dropping-letters_0.1.2.2.67_all.click /tmp
64+ adb shell pkcon --allow-untrusted install-local \
65+ /tmp/com.ubuntu.dropping-letters_0.1.2.2.67_all.click
66+
67+Now install the test sources ('--wipe' will remove any previously installed
68+test sources)::
69+
70+ phablet-click-test-setup --wipe --click com.ubuntu.dropping-letters
71+
72+The above phablet-click-test-setup command will install the standard test
73+dependencies and the click application's test sources as specified in the
74+manifest. This is usually the application's trunk branch. To override the test
75+sources with local changes, replace the test sources that were copied to the
76+device. This example assumes the application code is checked out under the
77+'dropping-letters' directory with the test sources under 'tests/autopilot'::
78+
79+ adb shell rm -rf /home/phablet/autopilot/dropping_letters_app
80+ adb push dropping-letters/tests/autopilot \
81+ /home/phablet/autopilot
82+
83+Finally, run the application tests::
84+
85+ ./scripts/run-autopilot-tests.sh -a dropping_letters_app
86+
87+The test results are available under::
88+
89+ clientlogs/dropping_letters_app/test_results.xml
90+
91+Running Tests for a Modified Debian Package
92+-------------------------------------------
93+
94+First provision the device with the desired image using the instructions
95+in the "Provisioning" section of this README.
96+
97+If the device is provisioned, and you have built the debian package
98+you wish to test with locally, install it on the device. For instance,
99+if you are building and installing dialer-app::
100+
101+ phablet-config writable-image -r 0000 --package-dir /path/to/packages -p dialer-app
102+
103+Alternatively, if you have built the packages in a ppa, you could use::
104+
105+ phablet-config writable-image -r 0000 --ppa ppa:ci-train-ppa-service/landing-004 -p dialer-app
106+
107+NOTE: If you have updates to the dependencies or tests in debian
108+packages, make sure to also install packages for those if required for
109+the change you are making. Some tests need a few extra dependencies
110+installed for the tests to function correctly. To see a list of them,
111+look at jenkins/testconfig.py.
112+
113+Finally, run the application tests::
114+
115+ ./scripts/run-autopilot-tests.sh -a dialer_app
116+
117+The test results are available under::
118+
119+ clientlogs/dialer_app/test_results.xml
120+

Subscribers

People subscribed via source and target branches