Added description of test scripts.
[gnucomo.git] / doc / test.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE doc SYSTEM "/usr/local/xslt/doc.dtd">
3 <?xml-stylesheet type="text/xsl" href="/usr/local/xslt/html.xsl"?>
4 <doc style="main.css">
5
6 <!--
7       Gnucomo - Gnu Computer Monitoring Test description
8       Original author :  Arjen Baart - arjen@andromeda.nl
9       Version         : $Revision: 1.1 $
10
11       This document is prepared for XMLDoc. Transform to HTML,
12       LaTeX, Postscript or plain text with XMLDoc utilities and
13       XSLT sheets from http://www.andromeda.nl/projects/xmldoc/
14 -->
15
16 <book>
17 <titlepage>
18    <title>Gnucomo - test description</title>
19    <para><picture src='logo.png' eps='logo' scale='0.7'/></para>
20    <author>Arjen Baart <code>&lt;arjen@andromeda.nl&gt;</code></author>
21    <date>October 25, 2007</date>
22    <docinfo>
23       <infoitem label="Version">0.1</infoitem>
24       <infoitem label="Organization">Andromeda Technology &amp; Automation</infoitem>
25       <infoitem label="Organization">De Winter Information Solutions</infoitem>
26    </docinfo>
27    <abstract>
28    </abstract>
29 </titlepage>
30
31 <toc/>
32
33 <chapter>
34 <heading>Testing Gnucomo</heading>
35 <para>
36 Large parts of Gnucomo are tested automatically.
37 The script that runs all these tests, <code>gcmtest</code>,
38 along with individual scripts and data files, is located in the
39 directory <code>test</code> in the Gnucomo source distribution.
40 </para>
41 </chapter>
42
43 <chapter>
44 <heading>Test cases</heading>
45
46 <para>
47 This chapter describes individual test cases.
48 </para>
49
50 <section>
51 <heading>Test 0001: Database</heading>
52 <para>
53 Create and destroy the database.
54 </para>
55 </section>
56
57 <section>
58 <heading>Test 0002a: Read syslog entries</heading>
59 <para>
60 Create an object 'kithira.andromeda.nl' in the database and
61 parse a piece of a syslog file.
62 This tests normal operation in which gcm_input reads a syslog file
63 directly.
64 </para>
65 </section>
66
67 <section>
68 <heading>Test 0003: Read corrupted syslog entries</heading>
69 <para>
70 Create an object 'vd.wt.tno.nl' in the database and
71 parse a piece of a syslog file with short and even empty lines.
72 There should be warnings printed on stderr.
73 </para>
74 </section>
75
76 <section>
77 <heading>Test 0004: Read syslog entries without hostname</heading>
78 <para>
79 Create an object 'kithira.andromeda.nl' in the database and
80 try to parse a piece of a syslog file without specifying the hostname.
81 The message should be rejected on account of an unknown host.
82 </para>
83 </section>
84
85 <section>
86 <heading>Test 0005: Read syslog entries without time</heading>
87 <para>
88 Create an object 'kithira.andromeda.nl' in the database and
89 parse a piece of a syslog file without specifying a time.
90 This tests wether an improper time still creates valid data.
91 </para>
92 </section>
93
94 <section>
95 <heading>Test 0008: Database upgrades</heading>
96 <para>
97 Test the database upgrades in gcm_daemon.
98 Create an old, version 1, database and run gcm_daemon to perform
99 an upgrade to the latest version.
100 Then, create a latest-version database and compare dumps of these
101 database. They should be essentially the same.
102 </para>
103 </section>
104
105 <section>
106 <heading>Test 0009: Service check notifications</heading>
107 <para>
108 Test the service check notifications.
109 Create a database with two objects and no services. After reading two
110 log file fragments for these two objects, gcm_daemon should create
111 'service unknown' notifications, one for each object, as well as a few
112 other notifications.
113
114 This tests problem report nr. 23
115 </para>
116 </section>
117
118 <section>
119 <heading>Test 0010: Processing log entries</heading>
120 <para>
121 Test the log processing of gcm_daemon
122 Create a database with one object and read a piece of sendmail log
123
124 This tests problem report nrs. 14 through 17
125 </para>
126 </section>
127
128 <section>
129 <heading>Test 0011: Ambiguous log entries</heading>
130 <para>
131 Create an object 'vd.wt.tno.nl' in the database and
132 parse a piece of a apache access file which may be mistaken for an rpm list
133 </para>
134 </section>
135
136 <section>
137 <heading>Test 0012: RPM package list</heading>
138 <para>
139 Create an object and parse an RPM package list.
140 Parameters and properties are created in the database.
141 The first line of the RPM list is empty. This tests whether
142 gcm_input can handle empty lines properly.
143 This tests problem report nr. 30.
144 </para>
145 </section>
146
147 </chapter>
148
149 </book>
150 </doc>