~pwlars/ubuntu-test-cases/krillin-recovery

« back to all changes in this revision

Viewing changes to README-cli.rst

  • Committer: Andy Doan
  • Date: 2013-10-21 15:15:37 UTC
  • mfrom: (70.3.9 ptr)
  • Revision ID: andy.doan@canonical.com-20131021151537-blgx90slc3jlnamc
This change differentiates autopilot and UTAH written tests (when MEGA=1 is enabled). In the event of an autopilot test, we'll execute them with the new run-autopilot-tests.sh script (which will only deliver xUnit XML results).

This change includes job options to allow a user to selectively choose packages/ppas/tests to run. The gist of this change allows us to support the Lab Test Execution Service we've been planning.

Downsides: The qa-dashboard doesn't yet know how to parse xUnit XML, so for now this can only be used on our staging servers and not by our daily image testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Touch Testing From the CLI
 
2
==========================
 
3
 
 
4
The touch testing execution framework was written so that its very easy to
 
5
run tests from home in the exact same way test are run in the lab. The only
 
6
thigs you need are:
 
7
 
 
8
 * This bzr branch
 
9
 * The phablet-tools_ package
 
10
 * An Ubuntu Touch supported_ device
 
11
 
 
12
.. _phablet-tools: http://launchpad.net/phablet-tools
 
13
.. _supported: http://wiki.ubuntu.com/Touch/Devices
 
14
 
 
15
There are two pieces to touch testing, provisioning and test execution. These
 
16
functions are independent of one another. eg, If your device already
 
17
has the proper image/configuration, you can simply use the test-runner.
 
18
 
 
19
Provisioning
 
20
------------
 
21
 
 
22
The provisioning script is a simple wrapper to commands from phablet-tools
 
23
to get a device ready for testing. Provisioning is performed with the
 
24
scripts/provision.sh command. Running::
 
25
 
 
26
  ./scripts/provision.sh -h
 
27
 
 
28
will list supported options.
 
29
 
 
30
Executing Tests
 
31
---------------
 
32
 
 
33
The touch testing repository supports both autopilot and UTAH test definitions.
 
34
 
 
35
Executing Autopilot Tests
 
36
~~~~~~~~~~~~~~~~~~~~~~~~~
 
37
 
 
38
One or more autopilot tests can be run on the target device using the command::
 
39
 
 
40
  ./scripts/run-autopilot-tests.sh
 
41
 
 
42
This is a small wrapper that uses phablet-tools to drive the tests. The
 
43
script can run one or more autopilot tests. By default it will reboot the
 
44
device between each test and ensure the device is settled using the
 
45
*system-settle* script. Both of those options can be disabled via command
 
46
line options. By default the script will create a directory named
 
47
*clientlogs* and then a subdirectory for each testsuite with result files.
 
48
These sub-directories include a xUnit XML formatted file, *test_results.xml*,
 
49
as well as several log files from the device to help with debugging failures.
 
50
 
 
51
An example testing two applications::
 
52
 
 
53
 ./scripts/run-autopilot-tests.sh -a dropping_letters_app -a music_app
 
54
 
 
55
Executing UTAH Tests
 
56
~~~~~~~~~~~~~~~~~~~~
 
57
 
 
58
Executing UTAH tests locally will require you to install the UTAH client
 
59
package from a PPA::
 
60
 
 
61
  sudo add-apt-repository ppa:utah/stable
 
62
  sudo apt-get update
 
63
  sudo apt-get install utah-client
 
64
 
 
65
With that package installed UTAH tests can be run with::
 
66
 
 
67
  ./scripts/jenkins.sh
 
68
 
 
69
This script runs one test at a time and will put its test artifacts under the
 
70
*clientlogs* directory similar to the autopilot runner. The UTAH result file
 
71
will be named clientlogs/utah.yaml.
 
72
 
 
73
An example of running the sdk test suite::
 
74
 
 
75
  ./scripts/jenkins.sh -a sdk
 
76