Project

General

Profile

Sprint Report » History » Version 20

aplanas, 2013-08-07 09:08

1 20
Sprint Report
2
=============
3
4
{{toc}}
5
6
Justification of the project
7
----------------------------
8
9
The last 12.3 release was important for us for different of reasons. One
10
of then is that we tried to include the quality assurance (QA) protocol
11
a bit early in the release process. One of the reason for that decision
12
was that we include for first time Secure Boot, and this technology was
13
preceded by some reports of broken machines.
14
15
The focus of the QA was put initially in the boot process during 12.3
16
release, but a set of user space tools was tested also, like for example
17
the network manager and the WiFi connectivity (for a full list of item
18
tested during 12.3 see [1])
19
20
In parallel, we try to include the openQA tool in the release process,
21
delegating a subset of those tests that can be done in an automatic way
22
using a virtual machine. But soon we discovered a set of problems with
23
the original version of openQA in relation with the requirement of our
24
process:
25
26
-   Screen resolution: openQA heavily relies on defined screen
27
    resolutions. If a milestone change the resolution, all the tests can
28
    be useless, creating untestable builds.
29
30
-   With openQA is difficult to know in witch state of the test is in.
31
    When a major failure appeared, openQA lost the control over the
32
    test.
33
34
-   Complicated maintenance: some image matching is MD5 based
35
    (deprecated in openQA, but with working code in some parts and
36
    tests), some other is screen-shot based. There is a test that use a
37
    median color to make an assert.
38
39
-   Disk Usage: the screen-shot file format (PPM) is inefficient and
40
    wastes disk space. This is a limiting factor.
41
42
For a more comprehensive background of the motivations, please, refer to
43
the article in the openSUSE blog [2]
44
45
Goals achieved in the project
46
-----------------------------
47
48
These are the main goals achieved during this project, and the tasks
49
associated with these goals.
50
51
-   Integration with openCV. We use a single graphic library for all the
52
    basic graphic operations.
53
    -   action \#293: Replace the SWIG by XS
54
    -   action \#294: Replace the basic API that use Perl calls to
55
        openCV call in C++
56
57
-   Improve graphic matching
58
    -   action \#295: Adapt the openCV fuzzy matching
59
    -   action \#374: Improve openCV matching
60
61
-   Remove of the PPM image format to save disk space
62
    -   action \#258: Convert images from PPM to PNG and resize the
63
        images to a fixed size.
64
    -   action \#306: Create a video from PNG files
65
66
-   Remove deprecated MD5 matching
67
    -   action \#263: Replace the image matching based on md5 sums by
68
        openCV.
69
70
-   Create the concept of Needle. A needle is an screen-shot with a
71
    metadata in JSON format. The needle is used to make asserts inside a
72
    test. Every needle define one or more areas that represent an image
73
    snippet that can be preprocessed with an OCR.
74
    -   action \#259: Adapt the test definitions to the new matching
75
    -   action \#283: add function to verify a needle is no longer
76
        present
77
    -   action \#297: Test Tesseract as a better OCR
78
    -   action \#298: Cretate goandclick API function
79
    -   action \#299: Refactor needels to remove the good label for tag
80
    -   action \#300: Add checkneedle method to the API
81
    -   action \#301: Write needle DB query API
82
    -   action \#302: Create needles for DVD installation
83
    -   action \#303: Create needles for NET installation
84
    -   action \#304: Create needles for KDE installation
85
    -   action \#305: Create needles for GNOME installation
86
    -   action \#310: Create a way to filter the needles that are used
87
        in the test
88
    -   action \#313: Evaluate a composite approach for the needles
89
90
-   The needle concept resolve two different problems indirectly:
91
    -   Avoid the definitions of global timeouts, because the assert can
92
        fail as sooner as possible
93
    -   Better control of the status of the test. The test can check
94
        that what is the current status and make decisions about that.
95
        For example, the test can check if one command ask for the root
96
        password, and if this is the case, insert the it as requested.
97
98
-   Improve the control for the QEMU instance, allowing multiple
99
    connections at the same time to the same QEMU virtual machine in
100
    parallel.
101
    -   action \#257: rewrite qemu monitor backend to use json
102
    -   action \#285: port qemu backend to QMP
103
104
-   Add snapshots to the virtual machine, so the user can decide from
105
    where to re-launch the test, and implement some rollback policies
106
    that assure a-known-state for the next test when a previous one
107
    fail.
108
    -   action \#383: Add QEMU snapshots
109
    -   action \#396: add “passed with defects” state
110
    -   action \#478: Merge test drivers in a single function
111
    -   action \#497: Implement SKIPTO environment variable
112
113
-   Change the architecture of the project, adding distributed workers
114
    and a queue for job dispatching.
115
    -   action \#377: get rid of checklog
116
    -   action \#474: Regular expressions to analyze ISO names
117
    -   action \#496: implement the json dispatcher interface
118
    -   action \#498: write worker around os-autoinst
119
    -   action \#499: Create a RPC function to register new ISO images
120
        and create testing jobs for them
121
    -   action \#515: write systemd generator for workers
122
123
-   Create a proper package to install openQA en openSUSE and SLE
124
    machines
125
    -   action \#232: Create openCV 2.4.4 package for SLE
126
127
-   Improve the user interface, creating a new needle editor in
128
    javascript and adding more development tools
129
    -   action \#361: Update WebUI to allow new openQA features
130
    -   action \#286: add a needle editor
131
    -   action \#379: Add debug information in the user interface
132
    -   action \#380: Exted fail JSON document to put needles candidates
133
    -   action \#384: Create clone-needle from a diff image
134
    -   action \#385: Improve the visualization of the unmatched needle
135
    -   action \#386: Enhance navigation in test results: an easy one to
136
        go to the next failing testmodule
137
    -   action \#388: Keep webUI up to date to handle new os-autoinst
138
        output
139
    -   action \#389: Use mean square error to detect the best candidate
140
    -   action \#466: Create a basic signaling architecture for
141
        os-autoinst
142
    -   action \#467: Update the webIU to control os-autoinst
143
144
But the main goal of the project is test every build of -Factory
145
(especially milestones and beta) using a more reliable tool, where the
146
actual bugs of the distribution are well an clearly spotted to the
147
release manager and the openSUSE community and team.
148
149
Description of the project
150
--------------------------
151
152
The project has used five developers (non full time) during 10 weeks.
153
The full description of the tasks and the time distribution can be found
154
on the Gantt diagram [3] of the project.
155
156
The project has been split in 10 development milestones where new
157
features was added, 1 integration milestone where the current version of
158
openQA was integrated with upstream, 2 maintenance milestones, where end
159
of sprint and future tasks where managed, and 2 management milestones
160
where the project manager can put tasks related with the management of
161
the project and the general marketing actions.
162
163
The source code of the project is now divided in three repositories:\
164
\* Development version of os-autoins:
165
https://github.com/openSUSE-Team/os-autoinst\
166
\* Needles database:
167
https://github.com/openSUSE-Team/os-autoinst-needles\
168
\* Development version of the user interface application:
169
https://github.com/openSUSE-Team/openQA
170
171
The integration between the development version and the upstream version
172
is done here: https://github.com/bmwiedemann/os-autoinst/tree/v2
173
174
Conclusion
175
----------
176
177
-   As we said previously, all the technical goals can be resumed in one
178
    single goal: have a better tool where the release manager and the
179
    team can discover bugs in the distribution. The success or fail of
180
    the project need to be devised using a simple metric: How many bugs
181
    we can see with the help of openQA during the 13.1 release process?
182
    Today is a bit too soon to measure this, we need to wait to deploy
183
    the tool and use it during 13.1 release process.
184
185
-   In the technical point of view, the team managed to improve three
186
    key aspects:
187
    -   We have a better way to describe tests and run them in a
188
        controllable environment
189
    -   We improve the architecture of openQA, opening the possibility
190
        to run it in a distributed environment
191
    -   We have better tools to diagnose when a test fail, and fix it
192
        for the usual scenarios
193
194
-   The project is now in maintenance mode. We defined a set of tasks
195
    that we can work on in future sprints [4]
196
197
-   We will use the githup bug tracker to register the new bugs that we
198
    need to work on during the maintenance period [5]
199
200
-   SUSE and openSUSE Team invest in this sprint 500 hours of effort
201
    between design/development and dissemination. The total investment,
202
    including hardware, indirect cost, etc. are about 23.000 EUR (30.000
203
    USD). But there is some extra cost related with the deployment and
204
    exploitation of the tool that are not considered yet.
205
206
References
207
----------
208
209
[1]
210
http://board.opensuse.org/projects/openqa-improvement/wiki/TestedIn123\
211
[2] http://lizards.opensuse.org/2013/06/06/openqa-in-opensuse/\
212
[3] https://board.opensuse.org/projects/openqa-improvement/issues/gantt\
213
[4] https://board.opensuse.org/versions/show/50\
214
[5] https://github.com/bmwiedemann/os-autoinst/issues