~pieq/checkbox/1624968-updated-docking-tests

« back to all changes in this revision

Viewing changes to checkbox-ng/docs/testing-snappy.rst

  • Committer: Sylvain Pineau
  • Author(s): Maciej Kisielewski
  • Date: 2016-08-25 10:42:15 UTC
  • mfrom: (4473.1.14 launchpad/docs-rework)
  • Revision ID: sylvain_pineau-20160825104215-q33dadyxasqt33jf
"automatic merge of lp:~kissiel/checkbox/docs-rework/ by tarmac [r=cypressyew,jocave][bug=][author=kissiel]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _testing-snappy:
 
2
 
 
3
Running Checkbox on Ubuntu Core
 
4
===============================
 
5
 
 
6
 
 
7
Introduction
 
8
------------
 
9
 
 
10
 
 
11
Checkbox is a hardware testing tool developed by Canonical for certifying
 
12
hardware with Ubuntu. Checkbox is free software and is available at
 
13
http://launchpad.net/checkbox.
 
14
 
 
15
To support the release of devices running snappy Ubuntu Core, Canonical has
 
16
produced versions of Checkbox tailored specifically for these systems.
 
17
 
 
18
This document aims to provide the reader with enough information to install and
 
19
run Checkbox on an Ubuntu Core system, and how to view/interpret/submit test
 
20
results.
 
21
 
 
22
Installation
 
23
------------
 
24
 
 
25
Installing Ubuntu Core on KVM
 
26
`````````````````````````````
 
27
Download the following release of Ubuntu Core (or the one provided by Canonical
 
28
for your project)::
 
29
 
 
30
    $ wget https://people.canonical.com/~mvo/all-snaps/amd64-all-snap.img.xz
 
31
 
 
32
Install it on a snappy DUT or boot the img file in kvm with::
 
33
 
 
34
    $ unxz amd64-all-snap.img.xz
 
35
    $ kvm -m 4096 -redir tcp:8022::22 ./amd64-all-snap.img
 
36
 
 
37
Log in as the ubuntu user (password ubuntu)::
 
38
 
 
39
    $ ssh -p 8022 ubuntu@localhost
 
40
 
 
41
Perform a snappy update::
 
42
 
 
43
    $ sudo snappy update
 
44
 
 
45
Installing Checkbox Snap
 
46
````````````````````````
 
47
 
 
48
Now you are ready to install the checkbox snap,
 
49
download it from launchpad::
 
50
 
 
51
    $ wget https://code.launchpad.net/~checkbox-dev/+snap/checkbox-snappy/+build/444/+files/checkbox-snappy_0.1_amd64.snap
 
52
 
 
53
Copy the snap file to the target system (using scp or snappy-remote)::
 
54
 
 
55
    $ snappy-remote --url=ssh://localhost:8022 install ./checkbox-snappy_0.1_amd64.snap
 
56
 
 
57
 
 
58
Running Checkbox
 
59
----------------
 
60
 
 
61
Simply launch checkbox using::
 
62
 
 
63
    $ checkbox-snappy.test-runner
 
64
 
 
65
|
 
66
 
 
67
.. image:: _images/RunningSnappy1.png
 
68
 
 
69
|
 
70
 
 
71
Checkbox keeps track are previous test runs, if a session is not completed,
 
72
you’ll be asked to resume your previous run or create a new session:
 
73
 
 
74
|
 
75
 
 
76
.. image:: _images/RunningSnappy2.png
 
77
 
 
78
|
 
79
 
 
80
The first selection screen will ask you to select a test plan to run:
 
81
 
 
82
|
 
83
 
 
84
.. image:: _images/RunningSnappy3.png
 
85
 
 
86
|
 
87
 
 
88
Move the selection with the arrow keys, select with space and confirm your
 
89
choice by moving the selection to <OK> and press Enter.  The next screen will
 
90
allow you to fine tune the tests you want to run:
 
91
 
 
92
|
 
93
 
 
94
.. image:: _images/RunningSnappy4.png
 
95
 
 
96
|
 
97
 
 
98
Tests are grouped by categories, Expand/Collapse with Enter, select/unselect
 
99
with space (also works on categories). Press S to select all and D to Deselect
 
100
all the tests.
 
101
 
 
102
|
 
103
 
 
104
Start the tests by pressing T.
 
105
 
 
106
|
 
107
 
 
108
Checkbox is a test runner able to process fully automated tests/commands and
 
109
tests requiring user interaction (whether to setup or plug something to the
 
110
device, e.g USB insertion or to confirm that the device acts as expected, e.g a
 
111
led blinks).
 
112
 
 
113
|
 
114
 
 
115
Please refer to the checkbox documentation to learn more about the supported
 
116
type of tests.
 
117
 
 
118
|
 
119
 
 
120
A fully automated test will stream stdout/stderr to your terminal allowing you
 
121
to immediately look at the i/o logs (if the session is run interactively).
 
122
Attachments jobs are treated differently as they could generate lots of i/o.
 
123
Therefore their outputs are hidden by default.
 
124
 
 
125
|
 
126
 
 
127
Interactive jobs will pause the test runner and details the steps to complete
 
128
the test:
 
129
 
 
130
|
 
131
 
 
132
.. image:: _images/RunningSnappy5.png
 
133
 
 
134
|
 
135
 
 
136
Getting Results
 
137
---------------
 
138
 
 
139
When the test selection has been run, the first displayed screen will allow you
 
140
to re-run failed jobs (e.g. the wireless access point was not properly
 
141
configured):
 
142
 
 
143
|
 
144
 
 
145
.. image:: _images/RunningSnappy6.png
 
146
 
 
147
|
 
148
 
 
149
Commands to select the tests to rerun are the same used to select tests in the
 
150
first selection screen. Here you can rerun your selection with R or finish the
 
151
session by pressing F.
 
152
 
 
153
|
 
154
 
 
155
Checkbox will then print the the test results in the terminal and save them in
 
156
different formats locally on the device (and print their respective filenames):
 
157
 
 
158
|
 
159
 
 
160
.. image:: _images/RunningSnappy7.png
 
161
 
 
162
|
 
163
 
 
164
The resulting reports can be easily pulled from the system via SCP, or by
 
165
simply copying to a USB stick.