VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/docs/AutomaticTestingRevamp.html@ 52776

Last change on this file since 52776 was 52776, checked in by vboxsync, 10 years ago

fix OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mime-type set to text/html
File size: 53.3 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
7<title></title>
8<style type="text/css">
9
10/*
11:Author: David Goodger (goodger@python.org)
12:Id: $Id: AutomaticTestingRevamp.html 52776 2014-09-17 14:51:43Z vboxsync $
13:Copyright: This stylesheet has been placed in the public domain.
14
15Default cascading style sheet for the HTML output of Docutils.
16
17See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18customize this style sheet.
19*/
20
21/* used to remove borders from tables and images */
22.borderless, table.borderless td, table.borderless th {
23 border: 0 }
24
25table.borderless td, table.borderless th {
26 /* Override padding for "table.docutils td" with "! important".
27 The right padding separates the table cells. */
28 padding: 0 0.5em 0 0 ! important }
29
30.first {
31 /* Override more specific margin styles with "! important". */
32 margin-top: 0 ! important }
33
34.last, .with-subtitle {
35 margin-bottom: 0 ! important }
36
37.hidden {
38 display: none }
39
40a.toc-backref {
41 text-decoration: none ;
42 color: black }
43
44blockquote.epigraph {
45 margin: 2em 5em ; }
46
47dl.docutils dd {
48 margin-bottom: 0.5em }
49
50object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
51 overflow: hidden;
52}
53
54/* Uncomment (and remove this text!) to get bold-faced definition list terms
55dl.docutils dt {
56 font-weight: bold }
57*/
58
59div.abstract {
60 margin: 2em 5em }
61
62div.abstract p.topic-title {
63 font-weight: bold ;
64 text-align: center }
65
66div.admonition, div.attention, div.caution, div.danger, div.error,
67div.hint, div.important, div.note, div.tip, div.warning {
68 margin: 2em ;
69 border: medium outset ;
70 padding: 1em }
71
72div.admonition p.admonition-title, div.hint p.admonition-title,
73div.important p.admonition-title, div.note p.admonition-title,
74div.tip p.admonition-title {
75 font-weight: bold ;
76 font-family: sans-serif }
77
78div.attention p.admonition-title, div.caution p.admonition-title,
79div.danger p.admonition-title, div.error p.admonition-title,
80div.warning p.admonition-title, .code .error {
81 color: red ;
82 font-weight: bold ;
83 font-family: sans-serif }
84
85/* Uncomment (and remove this text!) to get reduced vertical space in
86 compound paragraphs.
87div.compound .compound-first, div.compound .compound-middle {
88 margin-bottom: 0.5em }
89
90div.compound .compound-last, div.compound .compound-middle {
91 margin-top: 0.5em }
92*/
93
94div.dedication {
95 margin: 2em 5em ;
96 text-align: center ;
97 font-style: italic }
98
99div.dedication p.topic-title {
100 font-weight: bold ;
101 font-style: normal }
102
103div.figure {
104 margin-left: 2em ;
105 margin-right: 2em }
106
107div.footer, div.header {
108 clear: both;
109 font-size: smaller }
110
111div.line-block {
112 display: block ;
113 margin-top: 1em ;
114 margin-bottom: 1em }
115
116div.line-block div.line-block {
117 margin-top: 0 ;
118 margin-bottom: 0 ;
119 margin-left: 1.5em }
120
121div.sidebar {
122 margin: 0 0 0.5em 1em ;
123 border: medium outset ;
124 padding: 1em ;
125 background-color: #ffffee ;
126 width: 40% ;
127 float: right ;
128 clear: right }
129
130div.sidebar p.rubric {
131 font-family: sans-serif ;
132 font-size: medium }
133
134div.system-messages {
135 margin: 5em }
136
137div.system-messages h1 {
138 color: red }
139
140div.system-message {
141 border: medium outset ;
142 padding: 1em }
143
144div.system-message p.system-message-title {
145 color: red ;
146 font-weight: bold }
147
148div.topic {
149 margin: 2em }
150
151h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
152h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
153 margin-top: 0.4em }
154
155h1.title {
156 text-align: center }
157
158h2.subtitle {
159 text-align: center }
160
161hr.docutils {
162 width: 75% }
163
164img.align-left, .figure.align-left, object.align-left {
165 clear: left ;
166 float: left ;
167 margin-right: 1em }
168
169img.align-right, .figure.align-right, object.align-right {
170 clear: right ;
171 float: right ;
172 margin-left: 1em }
173
174img.align-center, .figure.align-center, object.align-center {
175 display: block;
176 margin-left: auto;
177 margin-right: auto;
178}
179
180.align-left {
181 text-align: left }
182
183.align-center {
184 clear: both ;
185 text-align: center }
186
187.align-right {
188 text-align: right }
189
190/* reset inner alignment in figures */
191div.align-right {
192 text-align: inherit }
193
194/* div.align-center * { */
195/* text-align: left } */
196
197ol.simple, ul.simple {
198 margin-bottom: 1em }
199
200ol.arabic {
201 list-style: decimal }
202
203ol.loweralpha {
204 list-style: lower-alpha }
205
206ol.upperalpha {
207 list-style: upper-alpha }
208
209ol.lowerroman {
210 list-style: lower-roman }
211
212ol.upperroman {
213 list-style: upper-roman }
214
215p.attribution {
216 text-align: right ;
217 margin-left: 50% }
218
219p.caption {
220 font-style: italic }
221
222p.credits {
223 font-style: italic ;
224 font-size: smaller }
225
226p.label {
227 white-space: nowrap }
228
229p.rubric {
230 font-weight: bold ;
231 font-size: larger ;
232 color: maroon ;
233 text-align: center }
234
235p.sidebar-title {
236 font-family: sans-serif ;
237 font-weight: bold ;
238 font-size: larger }
239
240p.sidebar-subtitle {
241 font-family: sans-serif ;
242 font-weight: bold }
243
244p.topic-title {
245 font-weight: bold }
246
247pre.address {
248 margin-bottom: 0 ;
249 margin-top: 0 ;
250 font: inherit }
251
252pre.literal-block, pre.doctest-block, pre.math, pre.code {
253 margin-left: 2em ;
254 margin-right: 2em }
255
256pre.code .ln { color: grey; } /* line numbers */
257pre.code, code { background-color: #eeeeee }
258pre.code .comment, code .comment { color: #5C6576 }
259pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
260pre.code .literal.string, code .literal.string { color: #0C5404 }
261pre.code .name.builtin, code .name.builtin { color: #352B84 }
262pre.code .deleted, code .deleted { background-color: #DEB0A1}
263pre.code .inserted, code .inserted { background-color: #A3D289}
264
265span.classifier {
266 font-family: sans-serif ;
267 font-style: oblique }
268
269span.classifier-delimiter {
270 font-family: sans-serif ;
271 font-weight: bold }
272
273span.interpreted {
274 font-family: sans-serif }
275
276span.option {
277 white-space: nowrap }
278
279span.pre {
280 white-space: pre }
281
282span.problematic {
283 color: red }
284
285span.section-subtitle {
286 /* font-size relative to parent (h1..h6 element) */
287 font-size: 80% }
288
289table.citation {
290 border-left: solid 1px gray;
291 margin-left: 1px }
292
293table.docinfo {
294 margin: 2em 4em }
295
296table.docutils {
297 margin-top: 0.5em ;
298 margin-bottom: 0.5em }
299
300table.footnote {
301 border-left: solid 1px black;
302 margin-left: 1px }
303
304table.docutils td, table.docutils th,
305table.docinfo td, table.docinfo th {
306 padding-left: 0.5em ;
307 padding-right: 0.5em ;
308 vertical-align: top }
309
310table.docutils th.field-name, table.docinfo th.docinfo-name {
311 font-weight: bold ;
312 text-align: left ;
313 white-space: nowrap ;
314 padding-left: 0 }
315
316h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
317h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
318 font-size: 100% }
319
320ul.auto-toc {
321 list-style-type: none }
322
323</style>
324</head>
325<body>
326<div class="document">
327
328
329<div class="section" id="revamp-of-automatic-virtualbox-testing">
330<h1>Revamp of Automatic VirtualBox Testing</h1>
331<div class="section" id="introduction">
332<h2>Introduction</h2>
333<p>This is the design document for a revamped automatic testing framework.
334The revamp aims at replacing the current tinderbox based testing by a new
335system that is written from scratch.</p>
336<p>The old system is not easy to work with and was never meant to be used for
337managing tests, after all it just a simple a build manager tailored for
338contiguous building. Modifying the existing tinderbox system to do what
339we want would require fundamental changes that would render it useless as
340a build manager, it would therefore end up as a fork. The amount of work
341required would probably be about the same as writing a new system from
342scratch. Other considerations, such as the license of the tinderbox
343system (MPL) and language it is realized in (Perl), are also in favor of
344doing it from scratch.</p>
345<p>The language envisioned for the new automatic testing framework is Python. This
346is for several reasons:</p>
347<blockquote>
348<ul class="simple">
349<li>The VirtualBox API has Python bindings.</li>
350<li>Python is used quite a bit inside Sun (dunno about Oracle).</li>
351<li>Works relatively well with Apache for the server side bits.</li>
352<li>It is more difficult to produce write-only code in Python (alias the
353we-don't-like-perl argument).</li>
354<li>You don't need to compile stuff.</li>
355</ul>
356</blockquote>
357<p>Note that the author of this document has no special training as a test
358engineer and may therefore be using the wrong terms here and there. The
359primary focus is to express what we need to do in order to improve
360testing.</p>
361<p>This document is written in reStructuredText (rst) which just happens to
362be used by Python, the primary language for this revamp. For more
363information on reStructuredText: <a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
364</div>
365</div>
366<div class="section" id="definitions-glossary">
367<h1>Definitions / Glossary</h1>
368<dl class="docutils">
369<dt>sub-test driver</dt>
370<dd>A set of test cases that can be used by more than one test driver. Could
371also be called a test unit, in the pascal sense of unit, if it wasn't so
372easily confused with 'unit test'.</dd>
373<dt>test</dt>
374<dd>This is somewhat ambiguous and this document try avoid using it where
375possible. When used it normally refers to doing testing by executing one or
376more testcases.</dd>
377<dt>test case</dt>
378<dd>A set of inputs, test programs and expected results. It validates system
379requirements and generates a pass or failed status. A basic unit of testing.
380Note that we use the term in a rather broad sense.</dd>
381<dt>test driver</dt>
382<dd>A program/script used to execute a test. Also known as a test harness.
383Generally abbreviated 'td'. It can have sub-test drivers.</dd>
384<dt>test manager</dt>
385<dd>Software managing the automatic testing. This is a web application that runs
386on a dedicated server (tindertux).</dd>
387<dt>test set</dt>
388<dd>The output of testing activity. Logs, results, ++. Our usage of this should
389probably be renamed to 'test run'.</dd>
390<dt>test group</dt>
391<dd>A collection of related test cases.</dd>
392<dt>testbox</dt>
393<dd>A computer that does testing.</dd>
394<dt>testbox script</dt>
395<dd>Script executing orders from the test manager on a testbox. Started
396automatically upon bootup.</dd>
397<dt>testing</dt>
398<dd>todo</dd>
399<dt>TODO: Check that we've got all this right and make them more exact</dt>
400<dd>where possible.</dd>
401</dl>
402<p>See also <a class="reference external" href="http://encyclopedia2.thefreedictionary.com/testing%20types">http://encyclopedia2.thefreedictionary.com/testing%20types</a>
403and <a class="reference external" href="http://www.aptest.com/glossary.html">http://www.aptest.com/glossary.html</a> .</p>
404</div>
405<div class="section" id="objectives">
406<h1>Objectives</h1>
407<blockquote>
408<ul class="simple">
409<li>A scalable test manager (&gt;200 testboxes).</li>
410<li>Optimize the web user interface (WUI) for typical workflows and analysis.</li>
411<li>Efficient and flexibile test configuration.</li>
412<li>Import test result from other test systems (logo testing, VDI, ++).</li>
413<li>Easy to add lots of new testscripts.</li>
414<li>Run tests locally without a manager.</li>
415<li>Revamp a bit at the time.</li>
416</ul>
417</blockquote>
418</div>
419<div class="section" id="the-testbox-side">
420<h1>The Testbox Side</h1>
421<p>Each testbox has a unique name corresponding to its DNS zone entry. When booted
422a testbox script is started automatically. This script will query the test
423manager for orders and execute them. The core order downloads and executes a
424test driver with parameters (configuration) from the server. The test driver
425does all the necessary work for executing the test. In a typical VirtualBox
426test this means picking a build, installing it, configuring VMs, running the
427test VMs, collecting the results, submitting them to the server, and finally
428cleaning up afterwards.</p>
429<p>The testbox environment which the test drivers are executed in will have a
430number of environment variables for determining location of the source images
431and other test data, scratch space, test set id, server URL, and so on and so
432forth.</p>
433<p>On startup, the testbox script will look for crash dumps and similar on
434systems where this is possible. If any sign of a crash is found, it will
435put any dumps and reports in the upload directory and inform the test
436manager before reporting for duty. In order to generate the proper file
437names and report the crash in the right test set as well as prevent
438reporting crashes unrelated to automatic testing, the testbox script will
439keep information (test set id, ++) in a separate scratch directory
440(${TESTBOX_PATH_SCRATCH}/../testbox) and make sure it is synced to the
441disk (both files and directories).</p>
442<p>After checking for crashes, the testbox script will clean up any previous test
443which might be around. This involves first invoking the test script in cleanup
444mode and the wiping the scratch space.</p>
445<p>When reporting for duty the script will submit information about the host: OS
446name, OS version, OS bitness, CPU vendor, total number of cores, VT-x support,
447AMD-V support, amount of memory, amount of scratch space, and anything else that
448can be found useful for scheduling tests or filtering test configurations.</p>
449<div class="section" id="testbox-script-orders">
450<h2>Testbox Script Orders</h2>
451<p>The orders are kept in a queue on the server and the testbox script will fetch
452them one by one. Orders that cannot be executed at the moment will be masked in
453the query from the testbox.</p>
454<dl class="docutils">
455<dt>Execute Test Driver</dt>
456<dd>Downloads and executes the a specified test driver with the given
457configuration (arguments). Only one test driver can be executed at a time.
458The server can specify more than one ZIP file to be downloaded and unpacked
459before executing the test driver. The testbox script may cache these zip
460files using http time stamping.</dd>
461<dt>Abort Test Driver</dt>
462<dd>Aborts the current test driver. This will drop a hint to the driver and give
463it 60 seconds to shut down the normal way. If that fails, the testbox script
464will kill the driver processes (SIGKILL or equivalent), invoke the
465testdriver in cleanup mode, and finally wipe the scratch area. Should either
466of the last two steps fail in some way, the testbox will be rebooted.</dd>
467<dt>Idle</dt>
468<dd>Ask again in X seconds, where X is specified by the server.</dd>
469<dt>Reboot</dt>
470<dd>Reboot the testbox. If a test driver is current running, an attempt at
471aborting it (Abort Test Driver) will be made first.</dd>
472<dt>Update</dt>
473<dd>Updates the testbox script. The order includes a server relative path to the
474new testbox script. This can only be executed when no test driver is
475currently being executed.</dd>
476</dl>
477</div>
478<div class="section" id="testbox-environment-variables">
479<h2>Testbox Environment: Variables</h2>
480<dl class="docutils">
481<dt>COMSPEC</dt>
482<dd>This will be set to C:WindowsSystem32cmd.exe on Windows.</dd>
483<dt>PATH</dt>
484<dd>This will contain the kBuild binary directory for the host platform.</dd>
485<dt>SHELL</dt>
486<dd>This will be set to point to kmk_ash(.exe) on all platforms.</dd>
487<dt>TESTBOX_NAME</dt>
488<dd>The testbox name.
489This is not required by the local reporter.</dd>
490<dt>TESTBOX_PATH_BUILDS</dt>
491<dd>The absolute path to where the build repository can be found. This should be
492a read only mount when possible.</dd>
493<dt>TESTBOX_PATH_RESOURCES</dt>
494<dd>The absolute path to where static test resources like ISOs and VDIs can be
495found. The test drivers knows the layout of this. This should be a read only
496mount when possible.</dd>
497<dt>TESTBOX_PATH_SCRATCH</dt>
498<dd>The absolute path to the scratch space. This is the current directory when
499starting the test driver. It will be wiped automatically after executing the
500test.
501(Envisioned as ${TESTBOX_PATH_SCRIPTS}/../scratch and that
502${TESTBOX_PATH_SCRATCH}/ will be automatically wiped by the testbox script.)</dd>
503<dt>TESTBOX_PATH_SCRIPTS</dt>
504<dd>The absolute path to the test driver and the other files that was unzipped
505together with it. This is also where the test-driver-abort file will be put.
506(Envisioned as ${TESTBOX_PATH_SCRATCH}/../driver, see above.)</dd>
507<dt>TESTBOX_PATH_UPLOAD</dt>
508<dd>The absolute path to the upload directory for the testbox. This is for
509putting VOBs, PNGs, core dumps, crash dumps, and such on. The files should be
510bzipped or zipped if they aren't compress already. The names should contain
511the testbox and test set ID.</dd>
512<dt>TESTBOX_REPORTER</dt>
513<dd>The name of the test reporter back end. If not present, it will default to
514the local reporter.</dd>
515<dt>TESTBOX_TEST_SET_ID</dt>
516<dd>The test set ID if we're running.
517This is not required by the local reporter.</dd>
518<dt>TESTBOX_MANAGER_URL</dt>
519<dd>The URL to the test manager.
520This is not required by the local reporter.</dd>
521<dt>TESTBOX_XYZ</dt>
522<dd>There will probably be some more of these.</dd>
523</dl>
524</div>
525<div class="section" id="testbox-environment-core-utilities">
526<h2>Testbox Environment: Core Utilities</h2>
527<p>The testbox will not provide the typical unix /bin and /usr/bin utilities. In
528other words, cygwin will not be used on Windows!</p>
529<p>The testbox will provide the unixy utilties that ships with kBuild and possibly
530some additional ones from tools/<em>.</em>/bin in the VirtualBox tree (wget, unzip,
531zip, and so on). The test drivers will avoid invoking any of these utilites
532directly and instead rely on generic utility methods in the test driver
533framework. That way we can more easily reimplement the functionality of the
534core utilites and drop the dependency on them. It also allows us to quickly
535work around platform specific oddities and bugs.</p>
536</div>
537<div class="section" id="test-drivers">
538<h2>Test Drivers</h2>
539<p>The test drivers are programs that will do the actual testing. In addition to
540run under the testbox script, they can be executed in the VirtualBox development
541environment. This is important for bug analysis and for simplifying local
542testing by the developers before commiting changes. It also means the test
543drivers can be developed locally in the VirtualBox development environment.</p>
544<p>The main difference between executing a driver under the testbox script and
545running it manually is that there is no test manager in the latter case. The
546test result reporter will not talk to the server, but report things to a local
547log file and/or standard out/err. When invoked manually, all the necessary
548arguments will need to be specified by hand of course - it should be possible
549to extract them from a test set as well.</p>
550<p>For the early implementation stages, an implementation of the reporter interface
551that talks to the tinderbox base test manager will be needed. This will be
552dropped later on when a new test manager is ready.</p>
553<p>As hinted at in other sections, there will be a common framework
554(libraries/packages/classes) for taking care of the tedious bits that every
555test driver needs to do. Sharing code is essential to easing test driver
556development as well as reducing their complexity. The framework will contain:</p>
557<blockquote>
558<ul>
559<li><p class="first">A generic way of submitting output. This will be a generic interface with
560multiple implementation, the TESTBOX_REPORTER environment variable
561will decide which of them to use. The interface will have very specific
562methods to allow the reporter to do a best possible job in reporting the
563results to the test manager.</p>
564</li>
565<li><dl class="first docutils">
566<dt>Helpers for typical tasks, like:</dt>
567<dd><ul class="first last simple">
568<li>Copying files.</li>
569<li>Deleting files, directory trees and scratch space.</li>
570<li>Unzipping files.</li>
571<li>Creating ISOs</li>
572<li>And such things.</li>
573</ul>
574</dd>
575</dl>
576</li>
577<li><p class="first">Helpers for installing and uninstalling VirtualBox.</p>
578</li>
579<li><p class="first">Helpers for defining VMs. (The VBox API where available.)</p>
580</li>
581<li><p class="first">Helpers for controlling VMs. (The VBox API where available.)</p>
582</li>
583</ul>
584</blockquote>
585<p>The VirtualBox bits will be separate from the more generic ones, simply because
586this is cleaner it will allow us to reuse the system for testing other products.</p>
587<p>The framework will be packaged in a zip file other than the test driver so we
588don't waste time and space downloading the same common code.</p>
589<p>The test driver will poll for the file
590${TESTBOX_PATH_SCRIPTS}/test-driver-abort and abort all testing when it sees it.</p>
591<p>The test driver can be invoked in three modes: execute, help and cleanup. The
592default is execute mode, the help shows an configuration summary and the cleanup
593is for cleaning up after a reboot or aborted run. The latter is done by the
594testbox script on startup and after abort - the driver is expected to clean up
595by itself after a normal run.</p>
596</div>
597</div>
598<div class="section" id="the-server-side">
599<h1>The Server Side</h1>
600<p>The server side will be implemented using a webserver (apache), a database
601(postgres) and cgi scripts (Python). In addition a cron job (Python) running
602once a minute will generate static html for frequently used pages and maybe
603execute some other tasks for driving the testing forwards. The order queries
604from the testbox script is the primary driving force in the system. The total
605makes up the test manager.</p>
606<p>The test manager can be split up into three rough parts:</p>
607<blockquote>
608<ul class="simple">
609<li>Configuration (of tests, testgroups and testboxes).</li>
610<li>Execution (of tests, collecting and organizing the output).</li>
611<li>Analysis (of test output, mostly about presentation).</li>
612</ul>
613</blockquote>
614</div>
615<div class="section" id="test-manager-requirements">
616<h1>Test Manager: Requirements</h1>
617<p>List of requirements:</p>
618<blockquote>
619<ul>
620<li><p class="first">Two level testing - L1 quick smoke tests and L2 longer tests performed on
621builds passing L1. (Klaus (IIRC) ment this could be realized using
622test dependency.)</p>
623</li>
624<li><p class="first">Black listing builds (by revision or similar) known to be bad.</p>
625</li>
626<li><p class="first">Distinguish between build types so we can do a portion of the testing with
627strict builds.</p>
628</li>
629<li><p class="first">Easy to re-configure build source for testing different branch or for
630testing a release candidate. (Directory based is fine.)</p>
631</li>
632<li><p class="first">Useful to be able to partition testboxes (run specific builds on some
633boxes, let an engineer have a few boxes for a while).</p>
634</li>
635<li><p class="first">Interation with ILOM/...: reset systems.</p>
636</li>
637<li><p class="first">Be able to suspend testing on selected testboxes when doing maintance
638(where automatically resuming testing on reboot is undesired) or similar
639activity.</p>
640</li>
641<li><p class="first">Abort testing on seleced testboxes.</p>
642</li>
643<li><p class="first">Scheduling of tests requiring more than one testbox.</p>
644</li>
645<li><p class="first">Scheduling of tests that cannot be executing concurrently on several
646machines because of some global resource like an iSCSI target.</p>
647</li>
648<li><p class="first">Jump the scheduling queue. Scheduling of specified test the next time a
649testbox is available (optionally specifying which testbox to schedule it
650on).</p>
651</li>
652<li><dl class="first docutils">
653<dt>Configure tests with variable configuration to get better coverage. Two modes:</dt>
654<dd><ul class="first last simple">
655<li>TM generates the permutations based on one or more sets of test script arguments.</li>
656<li>Each configuration permuation is specified manually.</li>
657</ul>
658</dd>
659</dl>
660</li>
661<li><p class="first">Test specification needs to be flexible (select tests, disable test, test
662scheduling (run certain tests nightly), ... ).</p>
663</li>
664<li><p class="first">Test scheduling by hour+weekday and by priority.</p>
665</li>
666<li><p class="first">Test dependencies (test A depends on test B being successful).</p>
667</li>
668<li><p class="first">Historize all configuration data, in particular test configs (permutations
669included) and testboxes.</p>
670</li>
671<li><p class="first">Test sets has at a minimum a build reference, a testbox reference and a
672primary log associated with it.</p>
673</li>
674<li><dl class="first docutils">
675<dt>Test sets stores further result as a recursive collection of:</dt>
676<dd><ul class="first last simple">
677<li>hierachical subtest name (slash sep)</li>
678<li>test parameters / config</li>
679<li>bool fail/succ</li>
680<li>attributes (typed?)</li>
681<li>test time</li>
682<li>e.g. throughput</li>
683<li>subresults</li>
684<li>log</li>
685<li>screenshots, video,...</li>
686</ul>
687</dd>
688</dl>
689</li>
690<li><p class="first">The test sets database structure needs to designed such that data mining
691can be done in an efficient manner.</p>
692</li>
693<li><p class="first">Presentation/analysis: graphs!, categorize bugs, columns reorganizing
694grouped by test (hierarchical), overviews, result for last day.</p>
695</li>
696</ul>
697</blockquote>
698</div>
699<div class="section" id="test-manager-configuration">
700<h1>Test Manager: Configuration</h1>
701<div class="section" id="testboxes">
702<h2>Testboxes</h2>
703<p>Configuration of testboxes doesn't involve much work normally. A testbox
704is added manually to the test manager by entering the DNS entry and/or IP
705address (the test manager resolves the missing one when necessary) as well as
706the system UUID (when obtainable - should be displayed by the testbox script
707installer). Queries from unregistered testboxes will be declined as a kind of
708security measure, the incident should be logged in the webserver log if
709possible. In later dealings with the client the System UUID will be the key
710identifier. It's permittable for the IP address to change when the testbox
711isn't online, but not while testing (just imagine live migration tests and
712network tests). Ideally, the testboxes should not change IP address.</p>
713<p>The testbox edit function must allow changing the name and system UUID.</p>
714<p>One further idea for the testbox configuration is indicating what they are
715capable of to filter out tests and test configurations that won't work on that
716testbox. To examplify this take the ACP2 installation test. If the test
717manager does not make sure the testbox have VT-x or AMD-v capabilities, the test
718is surely going to fail. Other testbox capabilities would be total number of
719CPU cores, memory size, scratch space. These testbox capabilities should be
720collected automatically on bootup by the testbox script together with OS name,
721OS version and OS bitness.</p>
722<p>A final thought, instead of outright declining all requests from new testboxes,
723we could record the unregistered testboxes with ip, UUID, name, os info and
724capabilities but mark them as inactive. The test operator can then activate
725them on an activation page or edit the testbox or something.</p>
726</div>
727<div class="section" id="testcases">
728<h2>Testcases</h2>
729<p>We use the term testcase for a test.</p>
730</div>
731<div class="section" id="testgroups">
732<h2>Testgroups</h2>
733<p>Testcases are organized into groups. A testcase can be member of more than one
734group. The testcase gets a priority assigned to it in connection with the
735group membership.</p>
736<p>Testgroups are picked up by a testbox partition (aka scheduling group) and a
737prioirty, scheduling time restriction and dependencies on other test groups are
738associated with the assignment. A testgroup can be used by several testbox
739partitions.</p>
740<p>(This used to be called 'testsuites' but was renamed to avoid confusion with
741the VBox Test Suite.)</p>
742</div>
743<div class="section" id="scheduling">
744<h2>Scheduling</h2>
745<p>The initial scheduler will be modelled after what we're doing already on in the
746tinderbox driven testing. It's best described as a best effort continuous
747integration scheduler. Meaning, it will always use the latest build suitable
748for a testcase. It will schedule on a testcase level, using the combined
749priority of the testcase in the test group and the test group with the testbox
750partition, trying to spread the test case argument varation out accordingly
751over the whole scheduilng queue. Which argument variation to start with, is
752not undefined (random would be best).</p>
753<p>Later, we may add other schedulers as needed.</p>
754</div>
755</div>
756<div class="section" id="the-test-manager-database">
757<h1>The Test Manager Database</h1>
758<p>First a general warning:</p>
759<blockquote>
760The guys working on this design are not database experts, web
761programming experts or similar, rather we are low level guys
762who's main job is x86 &amp; AMD64 virtualization. So, please don't
763be too hard on us. :-)</blockquote>
764<p>A logical table layout can be found in TestManagerDatabaseMap.png (created by
765Oracle SQL Data Modeler, stored in TestManagerDatabase.dmd). The physical
766database layout can be found in TestManagerDatabaseInit.pgsql postgreSQL
767script. The script is commented.</p>
768<div class="section" id="data-history">
769<h2>Data History</h2>
770<p>We need to somehow track configuration changes over time. We also need to
771be able to query the exact configuration a test set was run with so we can
772understand and make better use of the results.</p>
773<p>There are different techniques for archiving this, one is tuple-versioning
774( <a class="reference external" href="http://en.wikipedia.org/wiki/Tuple-versioning">http://en.wikipedia.org/wiki/Tuple-versioning</a> ), another is log trigger
775( <a class="reference external" href="http://en.wikipedia.org/wiki/Log_trigger">http://en.wikipedia.org/wiki/Log_trigger</a> ). We use tuple-versioning in
776this database, with 'effective' as start date field name and 'expire' as
777the end (exclusive).</p>
778<p>Tuple-versioning has a shortcomming wrt to keys, both primary and foreign.
779The primary key of a table employing tuple-versioning is really
780'id' + 'valid_period', where the latter is expressed using two fields
781([effective...expire-1]). Only, how do you tell the database engine that
782it should not allow overlapping valid_periods? Useful suggestions are
783welcomed. :-)</p>
784<p>Foreign key references to a table using tuple-versioning is running into
785trouble because of the time axsis and that to our knowledge foreign keys
786must reference exactly one row in the other table. When time is involved
787what we wish to tell the database is that at any given time, there actually
788is exactly one row we want to match in the other table, only we've no idea
789how to express this. So, many foreign keys are not expressed in SQL of this
790database.</p>
791<p>In some cases, we extend the tuple-versioning with a generation ID so that
792normal foreign key referencing can be used. We only use this for recording
793(references in testset) and scheduling (schedqueue), as using it more widely
794would force updates (gen_id changes) to propagate into all related tables.</p>
795<dl class="docutils">
796<dt>See also:</dt>
797<dd><ul class="first last simple">
798<li><a class="reference external" href="http://en.wikipedia.org/wiki/Slowly_changing_dimension">http://en.wikipedia.org/wiki/Slowly_changing_dimension</a></li>
799<li><a class="reference external" href="http://en.wikipedia.org/wiki/Change_data_capture">http://en.wikipedia.org/wiki/Change_data_capture</a></li>
800<li><a class="reference external" href="http://en.wikipedia.org/wiki/Temporal_database">http://en.wikipedia.org/wiki/Temporal_database</a></li>
801</ul>
802</dd>
803</dl>
804</div>
805</div>
806<div class="section" id="test-manager-execution">
807<h1>Test Manager: Execution</h1>
808</div>
809<div class="section" id="test-manager-scenarios">
810<h1>Test Manager: Scenarios</h1>
811<div class="section" id="testbox-signs-on-at-bootup">
812<h2>#1 - Testbox Signs On (At Bootup)</h2>
813<dl class="docutils">
814<dt>The testbox supplies a number of inputs when reporting for duty:</dt>
815<dd><ul class="first last simple">
816<li>IP address.</li>
817<li>System UUID.</li>
818<li>OS name.</li>
819<li>OS version.</li>
820<li>CPU architecture.</li>
821<li>CPU count (= threads).</li>
822<li>CPU VT-x/AMD-V capability.</li>
823<li>CPU nested paging capability.</li>
824<li>Chipset I/O MMU capability.</li>
825<li>Memory size.</li>
826<li>Scratch size space (for testing).</li>
827<li>Testbox Script revision.</li>
828</ul>
829</dd>
830<dt>Results:</dt>
831<dd><ul class="first last simple">
832<li>ACK or NACK.</li>
833<li>Testbox ID and name on ACK.</li>
834</ul>
835</dd>
836</dl>
837<p>After receiving a ACK the testbox will ask for work to do, i.e. continue with
838scenario #2. In the NACK case, it will sleep for 60 seconds and try again.</p>
839<p>Actions:</p>
840<ol class="arabic">
841<li><p class="first">Validate the testbox by looking the UUID up in the TestBoxes table.
842If not found, NACK the request. SQL:</p>
843<pre class="literal-block">
844SELECT idTestBox, sName
845FROM TestBoxes
846WHERE uuidSystem = :sUuid
847 AND tsExpire = 'infinity'::timestamp;
848</pre>
849</li>
850<li><p class="first">Check if any of the information by testbox script has changed. The two
851sizes are normalized first, memory size rounded to nearest 4 MB and scratch
852space is rounded down to nearest 64 MB. If anything changed, insert a new
853row in the testbox table and historize the current one, i.e. set
854OLD.tsExpire to NEW.tsEffective and get a new value for NEW.idGenTestBox.</p>
855</li>
856<li><dl class="first docutils">
857<dt>Check with TestBoxStatuses:</dt>
858<dd><ol class="first last loweralpha simple">
859<li>If there is an row for the testbox in it already clean up change it
860to 'idle' state and deal with any open testset like described in
861scenario #9.</li>
862<li>If there is no row, add one with 'idle' state.</li>
863</ol>
864</dd>
865</dl>
866</li>
867<li><p class="first">ACK the request and pass back the idTestBox.</p>
868</li>
869</ol>
870<dl class="docutils">
871<dt>Note! Testbox.enabled is not checked here, that is only relevant when it asks</dt>
872<dd>for a new task (scenario #2 and #5).</dd>
873<dt>Note! Should the testbox script detect changes in any of the inputs, it should</dt>
874<dd>redo the sign in.</dd>
875<dt>Note! In scenario #8, the box will not sign on until it has done the reboot and</dt>
876<dd>cleanup reporting!</dd>
877</dl>
878</div>
879<div class="section" id="testbox-asks-for-work-to-do">
880<h2>#2 - Testbox Asks For Work To Do</h2>
881<dl class="docutils">
882<dt>Inputs:</dt>
883<dd><ul class="first last simple">
884<li>The testbox is supplying its IP indirectly.</li>
885<li>The testbox should supply its UUID and ID directly.</li>
886</ul>
887</dd>
888<dt>Results:</dt>
889<dd><ul class="first last simple">
890<li>IDLE, WAIT, EXEC, REBOOT, UPGRADE, UPGRADE-AND-REBOOT, SPECIAL or DEAD.</li>
891</ul>
892</dd>
893</dl>
894<p>Actions:</p>
895<ol class="arabic">
896<li><p class="first">Validate the ID and IP by selecting the currently valid testbox row:</p>
897<pre class="literal-block">
898SELECT idGenTestBox, fEnabled, idSchedGroup, enmPendingCmd
899FROM TestBoxes
900WHERE id = :id
901 AND uuidSystem = :sUuid
902 AND ip = :ip
903 AND tsExpire = 'infinity'::timestamp;
904</pre>
905<p>If NOT found return DEAD to the testbox client (it will go back to sign on
906mode and retry every 60 seconds or so - see scenario #1).</p>
907<dl class="docutils">
908<dt>Note! The WUI will do all necessary clean-ups when deleting a testbox, so</dt>
909<dd><p class="first last">contrary to the initial plans, we don't need to do anything more for
910the DEAD status.</p>
911</dd>
912</dl>
913</li>
914<li><p class="first">Check with TestBoxStatuses (maybe joined with query from 1).</p>
915<p>If enmState is 'gang-gathering': Goto scenario #6 on timeout or pending
916'abort' or 'reboot' command. Otherwise, tell the testbox to WAIT [done].</p>
917<p>If enmState is 'gang-testing': The gang has been gathered and execution
918has been triggered. Goto 5.</p>
919<p>If enmState is not 'idle', change it to 'idle'.</p>
920<p>If idTestSet is not NULL, CALL scenario #9 to it up.</p>
921<p>If there is a pending abort command, remove it.</p>
922<p>If there is a pending command and the old state doesn't indicate that it was
923being executed, GOTO scenario #3.</p>
924<dl class="docutils">
925<dt>Note! There should be a TestBoxStatuses row after executing scenario #1,</dt>
926<dd><p class="first last">however should none be found for some funky reason, returning DEAD
927will fix the problem (see above)</p>
928</dd>
929</dl>
930</li>
931<li><p class="first">If the testbox was marked as disabled, respond with an IDLE command to the
932testbox [done]. (Note! Must do this after TestBoxStatuses maintainance from
933point 2, or abandond tests won't be cleaned up after a testbox is disabled.)</p>
934</li>
935<li><p class="first">Consider testcases in the scheduling queue, pick the first one which the
936testbox can execute. There is a concurrency issue here, so we put and
937exclusive lock on the SchedQueues table while considering its content.</p>
938<p>The cursor we open looks something like this:</p>
939<pre class="literal-block">
940SELECT idItem, idGenTestCaseArgs,
941 idTestSetGangLeader, cMissingGangMembers
942FROM SchedQueues
943WHERE idSchedGroup = :idSchedGroup
944 AND ( bmHourlySchedule is NULL
945 OR get_bit(bmHourlySchedule, :iHourOfWeek) = 1 ) --&lt; does this work?
946ORDER BY ASC idItem;
947</pre>
948</li>
949</ol>
950<blockquote>
951<p>If there no rows are returned (this can happen because no testgroups are
952associated with this scheduling group, the scheduling group is disabled,
953or because the queue is being regenerated), we will tell the testbox to
954IDLE [done].</p>
955<dl class="docutils">
956<dt>For each returned row we will:</dt>
957<dd><ol class="first last loweralpha">
958<li><p class="first">Check testcase/group dependencies.</p>
959</li>
960<li><p class="first">Select a build (and default testsuite) satisfying the dependencies.</p>
961</li>
962<li><p class="first">Check the testcase requirements with that build in mind.</p>
963</li>
964<li><p class="first">If idTestSetGangLeader is NULL, try allocate the necessary resources.</p>
965</li>
966<li><p class="first">If it didn't check out, fetch the next row and redo from (a).</p>
967</li>
968<li><p class="first">Tentatively create a new test set row.</p>
969</li>
970<li><dl class="first docutils">
971<dt>If not gang scheduling:</dt>
972<dd><ul class="first last simple">
973<li>Next state: 'testing'</li>
974</ul>
975</dd>
976<dt>ElIf we're the last gang participant:</dt>
977<dd><ul class="first last simple">
978<li>Set idTestSetGangLeader to NULL.</li>
979<li>Set cMissingGangMembers to 0.</li>
980<li>Next state: 'gang-testing'</li>
981</ul>
982</dd>
983<dt>ElIf we're the first gang member:</dt>
984<dd><ul class="first last simple">
985<li>Set cMissingGangMembers to TestCaseArgs.cGangMembers - 1.</li>
986<li>Set idTestSetGangLeader to our idTestSet.</li>
987<li>Next state: 'gang-gathering'</li>
988</ul>
989</dd>
990<dt>Else:</dt>
991<dd><ul class="first last simple">
992<li>Decrement cMissingGangMembers.</li>
993<li>Next state: 'gang-gathering'</li>
994</ul>
995</dd>
996<dt>If we're not gang scheduling OR cMissingGangMembers is 0:</dt>
997<dd><p class="first last">Move the scheduler queue entry to the end of the queue.</p>
998</dd>
999</dl>
1000<p>Update our TestBoxStatuses row with the new state and test set.
1001COMMIT;</p>
1002</li>
1003</ol>
1004</dd>
1005</dl>
1006</blockquote>
1007<ol class="arabic" start="5">
1008<li><dl class="first docutils">
1009<dt>If state is 'testing' or 'gang-testing':</dt>
1010<dd><p class="first">EXEC reponse.</p>
1011<p class="last">The EXEC response for a gang scheduled testcase includes a number of
1012extra arguments so that the script knows the position of the testbox
1013it is running on and of the other members. This means the that the
1014TestSet.iGangMemberNo is passed using --gang-member-no and the IP
1015addresses of the all gang members using --gang-ipv4-&lt;memb-no&gt; &lt;ip&gt;.</p>
1016</dd>
1017<dt>Else (state is 'gang-gathering'):</dt>
1018<dd><p class="first last">WAIT</p>
1019</dd>
1020</dl>
1021</li>
1022</ol>
1023</div>
1024<div class="section" id="pending-command-when-testbox-asks-for-work">
1025<h2>#3 - Pending Command When Testbox Asks For Work</h2>
1026<p>This is a subfunction of scenario #2 and #5.</p>
1027<p>As seen in scenario #2, the testbox will send 'abort' commands to /dev/null
1028when it finds one when not executing a test. This includes when it reports
1029that the test has completed (no need to abort a completed test, wasting lot
1030of effort when standing at the finish line).</p>
1031<p>The other commands, though, are passed back to the testbox. The testbox
1032script will respond with an ACK or NACK as it sees fit. If NACKed, the
1033pending command will be removed (pending_cmd set to none) and that's it.
1034If ACKed, the state of the testbox will change to that appropriate for the
1035command and the pending_cmd set to none. Should the testbox script fail to
1036respond, the command will be repeated the next time it asks for work.</p>
1037</div>
1038<div class="section" id="testbox-uploads-results-during-test">
1039<h2>#4 - Testbox Uploads Results During Test</h2>
1040<p>TODO</p>
1041</div>
1042<div class="section" id="testbox-completes-test-and-asks-for-work">
1043<h2>#5 - Testbox Completes Test and Asks For Work</h2>
1044<p>This is very similar to scenario #2</p>
1045<p>TODO</p>
1046</div>
1047<div class="section" id="gang-gathering-timeout">
1048<h2>#6 - Gang Gathering Timeout</h2>
1049<p>This is a subfunction of scenario #2.</p>
1050<p>When gathering a gang of testboxes for a testcase, we do not want to wait
1051forever and have testboxes doing nothing for hours while waiting for partners.
1052So, the gathering has a reasonable timeout (imagine something like 20-30 mins).</p>
1053<p>Also, we need some way of dealing with 'abort' and 'reboot' commands being
1054issued while waiting. The easy way out is pretent it's a time out.</p>
1055<p>When changing the status to 'gang-timeout' we have to be careful. First of all,
1056we need to exclusively lock the SchedQueues and TestBoxStatuses (in that order)
1057and re-query our status. If it changed redo the checks in scenario #2 point 2.</p>
1058<p>If we still want to timeout/abort, change the state from 'gang-gathering' to
1059'gang-gathering-timedout' on all the gang members that has gathered so far.
1060Then reset the scheduling queue record and move it to the end of the queue.</p>
1061<p>When acting on 'gang-timeout' the TM will fail the testset in a manner similar
1062to scenario #9. No need to repeat that.</p>
1063</div>
1064<div class="section" id="gang-cleanup">
1065<h2>#7 - Gang Cleanup</h2>
1066<p>When a testbox completes a gang scheduled test, we will have to serialize
1067resource cleanup (both globally and on testboxes) as they stop. More details
1068can be found in the documentation of 'gang-cleanup'.</p>
1069<p>So, the transition from 'gang-testing' is always to 'gang-cleanup'. When we
1070can safely leave 'gang-cleanup' is decided by the query:</p>
1071<pre class="literal-block">
1072SELECT COUNT(*)
1073FROM TestBoxStatuses,
1074 TestSets
1075WHERE TestSets.idTestSetGangLeader = :idTestSetGangLeader
1076 AND TestSets.idTestBox = TestBoxStatuses.idTestBox
1077 AND TestBoxStatuses.enmState = 'gang-running'::TestBoxState_T;
1078</pre>
1079<p>As long as there are testboxes still running, we stay in the 'gang-cleanup'
1080state. Once there are none, we continue closing the testset and such.</p>
1081</div>
1082<div class="section" id="testbox-reports-a-crash-during-test-execution">
1083<h2>#8 - Testbox Reports A Crash During Test Execution</h2>
1084<p>TODO</p>
1085</div>
1086<div class="section" id="cleaning-up-abandond-testcase">
1087<h2>#9 - Cleaning Up Abandond Testcase</h2>
1088<p>This is a subfunction of scenario #1 and #2. The actions taken are the same in
1089both situations. The precondition for taking this path is that the row in the
1090testboxstatus table is refering to a testset (i.e. testset_id is not NULL).</p>
1091<p>Actions:</p>
1092<ol class="arabic">
1093<li><dl class="first docutils">
1094<dt>If the testset is incomplete, we need to completed:</dt>
1095<dd><ol class="first last loweralpha simple">
1096<li>Add a message to the root TestResults row, creating one if necesary,
1097that explains that the test was abandond. This is done
1098by inserting/finding the string into/in TestResultStrTab and adding
1099a row to TestResultMsgs with idStrMsg set to that string id and
1100enmLevel set to 'failure'.</li>
1101<li>Mark the testset as failed.</li>
1102</ol>
1103</dd>
1104</dl>
1105</li>
1106<li><p class="first">Free any global resources referenced by the test set. This is done by
1107deleting all rows in GlobalResourceStatuses matching the testbox id.</p>
1108</li>
1109<li><p class="first">Set the idTestSet to NULL in the TestBoxStatuses row.</p>
1110</li>
1111</ol>
1112</div>
1113<div class="section" id="cleaning-up-a-disabled-dead-testbox">
1114<h2>#10 - Cleaning Up a Disabled/Dead TestBox</h2>
1115<p>The UI needs to be able to clean up the remains of a testbox which for some
1116reason is out of action. Normal cleaning up of abandond testcases requires
1117that the testbox signs on or asks for work, but if the testbox is dead or
1118in some way indisposed, it won't be doing any of that. So, the testbox
1119sheriff needs to have a way of cleaning up after it.</p>
1120<p>It's basically a manual scenario #9 but with some safe guards, like checking
1121that the box hasn't been active for the last 1-2 mins (max idle/wait time * 2).</p>
1122<dl class="docutils">
1123<dt>Note! When disabling a box that still executing the testbox script, this</dt>
1124<dd>cleanup isn't necessary as it will happen automatically. Also, it's
1125probably desirable that the testbox finishes what ever it is doing first
1126before going dormant.</dd>
1127</dl>
1128</div>
1129</div>
1130<div class="section" id="test-manager-analysis">
1131<h1>Test Manager: Analysis</h1>
1132<p>One of the testbox sheriff's tasks is to try figure out the reason why something
1133failed. The test manager will provide facilities for doing so from very early
1134in it's implementation.</p>
1135<p>We need to work out some useful status reports for the early implementation.
1136Later there will be more advanced analysis tools, where for instance we can
1137create graphs from selected test result values or test execution times.</p>
1138</div>
1139<div class="section" id="implementation-plan">
1140<h1>Implementation Plan</h1>
1141<p>This has changed for various reasons. The current plan is to implement the
1142infrastructure (TM &amp; testbox script) first and do a small deployment with the
11432-5 test drivers in the Testsuite as basis. Once the bugs are worked out, we
1144will convert the rest of the tests and start adding new ones.</p>
1145<p>We just need to finally get this done, no point in doing it piecemeal by now!</p>
1146<div class="section" id="test-manager-implementation-sub-tasks">
1147<h2>Test Manager Implementation Sub-Tasks</h2>
1148<p>The implementation of the test manager and adjusting/completing of the testbox
1149script and the test drivers are tasks which can be done by more than one
1150person. Splitting up the TM implementation into smaller tasks should allow
1151parallel development of different tasks and get us working code sooner.</p>
1152</div>
1153<div class="section" id="milestone-1">
1154<h2>Milestone #1</h2>
1155<p>The goal is to getting the fundamental testmanager engine implemented, debugged
1156and working. With the exception of testboxes, the configuration will be done
1157via SQL inserts.</p>
1158<p>Tasks in somewhat prioritized order:</p>
1159<blockquote>
1160<ul class="simple">
1161<li>Kick off test manager. It will live in testmanager/. Salvage as much as
1162possible from att/testserv. Create basic source and file layout.</li>
1163<li>Adjust the testbox script, part one. There currently is a testbox script
1164in att/testbox, this shall be moved up into testboxscript/. The script
1165needs to be adjusted according to the specification layed down earlier
1166in this document. Installers or installation scripts for all relevant
1167host OSes are required. Left for part two is result reporting beyond the
1168primary log. This task must be 100% feature complete, on all host OSes,
1169there is no room for FIXME, XXX or &#64;todo here.</li>
1170<li>Implement the schedule queue generator.</li>
1171<li>Implement the testbox dispatcher in TM. Support all the testbox script
1172responses implemented above, including upgrading the testbox script.</li>
1173<li>Implement simple testbox management page.</li>
1174<li>Implement some basic activity and result reports so that we can see
1175what's going on.</li>
1176<li>Create a testmanager / testbox test setup. This lives in selftest/.<ol class="arabic">
1177<li>Set up something that runs, no fiddly bits. Debug till it works.</li>
1178<li>Create a setup that tests testgroup dependencies, i.e. real tests
1179depending on smoke tests.</li>
1180<li>Create a setup that exercises testcase dependency.</li>
1181<li>Create a setup that exercises global resource allocation.</li>
1182<li>Create a setup that exercises gang scheduling.</li>
1183</ol>
1184</li>
1185<li>Check that all features work.</li>
1186</ul>
1187</blockquote>
1188</div>
1189<div class="section" id="milestone-2">
1190<h2>Milestone #2</h2>
1191<p>The goal is getting to VBox testing.</p>
1192<p>Tasks in somewhat prioritized order:</p>
1193<blockquote>
1194<ul class="simple">
1195<li>Implement full result reporting in the testbox script and testbox driver.
1196A testbox script specific reporter needs to be implemented for the
1197testdriver framework. The testbox script needs to forward the results to
1198the test manager, or alternatively the testdriver report can talk
1199directly to the TM.</li>
1200<li>Implement the test manager side of the test result reporting.</li>
1201<li>Extend the selftest with some setup that report all kinds of test
1202results.</li>
1203<li>Implement script/whatever feeding builds to the test manager from the
1204tinderboxes.</li>
1205<li>The toplevel test driver is a VBox thing that must be derived from the
1206base TestDriver class or maybe the VBox one. It should move from
1207toptestdriver to testdriver and be renamed to vboxtltd or smth.</li>
1208<li>Create a vbox testdriver that boots the t-xppro VM once and that's it.</li>
1209<li>Create a selftest setup which tests booting t-xppro taking builds from
1210the tinderbox.</li>
1211</ul>
1212</blockquote>
1213</div>
1214<div class="section" id="milestone-3">
1215<h2>Milestone #3</h2>
1216<p>The goal for this milestone is configuration and converting current testscases,
1217the result will be the a minimal test deployment (4-5 new testboxes).</p>
1218<p>Tasks in somewhat prioritized order:</p>
1219<blockquote>
1220<ul class="simple">
1221<li>Implement testcase configuration.</li>
1222<li>Implement testgroup configuration.</li>
1223<li>Implement build source configuration.</li>
1224<li>Implement scheduling group configuration.</li>
1225<li>Implement global resource configuration.</li>
1226<li>Re-visit the testbox configuration.</li>
1227<li>Black listing of builds.</li>
1228<li>Implement simple failure analysis and reporting.</li>
1229<li>Implement the initial smoke tests modelled on the current smoke tests.</li>
1230<li>Implement installation tests for Windows guests.</li>
1231<li>Implement installation tests for Linux guests.</li>
1232<li>Implement installation tests for Solaris guest.</li>
1233<li>Implement installation tests for OS/2 guest.</li>
1234<li>Set up a small test deployment.</li>
1235</ul>
1236</blockquote>
1237</div>
1238<div class="section" id="further-work">
1239<h2>Further work</h2>
1240<p>After milestone #3 has been reached and issues found by the other team members
1241have been addressed, we will probably go for full deployment.</p>
1242<p>Beyond this point we will need to improve reporting and analysis. There may be
1243configuration aspects needing reporting as well.</p>
1244<p>Once deployed, a golden rule will be that all new features shall have test
1245coverage. Preferrably, implemented by someone else and prior to the feature
1246implementation.</p>
1247</div>
1248</div>
1249<div class="section" id="discussion-logs">
1250<h1>Discussion Logs</h1>
1251<div class="section" id="various-discussions-with-michal-and-or-klaus">
1252<h2>2009-07-21,22,23 Various Discussions with Michal and/or Klaus</h2>
1253<ul class="simple">
1254<li>Scheduling of tests requiring more than one testbox.</li>
1255<li>Scheduling of tests that cannot be executing concurrently on several machines
1256because of some global resource like an iSCSI target.</li>
1257<li>Manually create the test config permutations instead of having the test
1258manager create all possible ones and wasting time.</li>
1259<li>Distinguish between built types so we can run smoke tests on strick builds as
1260well as release ones.</li>
1261</ul>
1262</div>
1263<div class="section" id="brief-discussion-with-michal">
1264<h2>2009-07-20 Brief Discussion with Michal</h2>
1265<ul class="simple">
1266<li>Installer for the testbox script to make bringing up a new testbox even
1267smoother.</li>
1268</ul>
1269</div>
1270<div class="section" id="raw-input">
1271<h2>2009-07-16 Raw Input</h2>
1272<ul>
1273<li><dl class="first docutils">
1274<dt>test set. recursive collection of:</dt>
1275<dd><ul class="first last simple">
1276<li>hierachical subtest name (slash sep)</li>
1277<li>test parameters / config</li>
1278<li>bool fail/succ</li>
1279<li>attributes (typed?)</li>
1280<li>test time</li>
1281<li>e.g. throughput</li>
1282<li>subresults</li>
1283<li>log</li>
1284<li>screenshots,....</li>
1285</ul>
1286</dd>
1287</dl>
1288</li>
1289<li><p class="first">client package (zip) dl from server (maybe client caching)</p>
1290</li>
1291<li><dl class="first docutils">
1292<dt>thoughts on bits to do at once.</dt>
1293<dd><ul class="first last simple">
1294<li>We <em>really</em> need the basic bits ASAP.</li>
1295<li>client -&gt; support for test driver</li>
1296<li>server -&gt; controls configs</li>
1297<li>cleanup on both sides</li>
1298</ul>
1299</dd>
1300</dl>
1301</li>
1302</ul>
1303</div>
1304<div class="section" id="id1">
1305<h2>2009-07-15 Raw Input</h2>
1306<ul class="simple">
1307<li>testing should start automatically</li>
1308<li>switching to branch too tedious</li>
1309<li>useful to be able to partition testboxes (run specific builds on some boxes, let an engineer have a few boxes for a while).</li>
1310<li>test specification needs to be more flexible (select tests, disable test, test scheduling (run certain tests nightly), ... )</li>
1311<li>testcase dependencies (blacklisting builds, run smoketests on box A before long tests on box B, ...)</li>
1312<li>more testing flexibility, more test than just install/moke. For instance unit tests, benchmarks, ...</li>
1313<li>presentation/analysis: graphs!, categorize bugs, columns reorganizing grouped by test (hierarchical), overviews, result for last day.</li>
1314<li>testcase specificion, variables (e.g. I/O-APIC, SMP, HWVIRT, SATA...) as sub-tests</li>
1315<li>interation with ILOM/...: reset systems</li>
1316<li>Changes needs LDAP authentication</li>
1317<li>historize all configuration w/ name</li>
1318<li>ability to run testcase locally (provided the VDI/ISO/whatever extra requirements can be met).</li>
1319</ul>
1320<hr class="docutils" />
1321<table class="docutils footnote" frame="void" id="id2" rules="none">
1322<colgroup><col class="label" /><col /></colgroup>
1323<tbody valign="top">
1324<tr><td class="label">[1]</td><td>no such footnote</td></tr>
1325</tbody>
1326</table>
1327<hr class="docutils" />
1328<table class="docutils field-list" frame="void" rules="none">
1329<col class="field-name" />
1330<col class="field-body" />
1331<tbody valign="top">
1332<tr class="field"><th class="field-name">Status:</th><td class="field-body">$Id: AutomaticTestingRevamp.html 52776 2014-09-17 14:51:43Z vboxsync $</td>
1333</tr>
1334<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Copyright (C) 2010-2014 Oracle Corporation.</td>
1335</tr>
1336</tbody>
1337</table>
1338</div>
1339</div>
1340</div>
1341</body>
1342</html>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette