Intergrated test scripts with automake
[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.2 $
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 <section>
148 <heading>Test 0013: RPM package updates</heading>
149 <para>
150 Create an object and parse an RPM package list and another RPM package
151 list where some packages are upgraded and removed.
152 Parameters and properties are created in the database.
153 Reading the second list should lead to notifications and additional
154 records in the parameter history table.
155 </para>
156 </section>
157
158 <section>
159 <heading>Test 0014: RPM package update repeats</heading>
160 <para>
161 Create an object and parse an RPM package list and another RPM package
162 list where some packages are upgraded and removed.
163 The second package list is read twice.
164 Parameters and properties are created in the database.
165 Reading the second list should lead to notifications and additional
166 records in the parameter history table.
167 Reading the second list another time should not change anything in the
168 database.
169 This tests PR 31.
170 </para>
171 </section>
172 <section>
173 <heading>Test 0015: Debian package list and repeated updates</heading>
174 <para>
175
176  Debian package list and repeated updates
177
178 This is basically the same test as test 0014, except we are now using
179 a Debian list from 'dpkg -l' instead of RPM.
180 Create an object and parse a Debian package list and another Debian package
181 list where some packages are upgraded and removed.
182 The second package list is read twice.
183 Parameters and properties are created in the database.
184 Reading the second list should lead to notifications and additional
185 records in the parameter history table.
186 Reading the second list another time should not change anything in the
187 database.
188 This tests PR 31.
189 </para>
190
191 </section>
192
193 <section>
194 <heading>Test 0020: Logrunner normal operation</heading>
195 <para>
196 Read a small logfile and check the XML output created
197 by logrunner.
198 Logrunner will put the hostname of the system where the test
199 is run in the ouput file.
200 </para>
201 </section>
202
203 <section>
204 <heading>Test 0021: Logrunner continuation</heading>
205 <para>
206 Read a small logfile in two parts and check the XML output created
207 by logrunner.
208 After reading the log for the first time, additional content is added
209 to the file and logrunner is called a second time.
210 This tests whether logrunner will continue a log file after additional
211 data is appended to that log file.
212 </para>
213 </section>
214
215 <section>
216 <heading>Test 0022: Logrunner long lines</heading>
217 <para>
218 Read a small logfile with a long (> 4096 bytes) line.
219 Logrunner should create an XML message with the long
220 line intact.
221 Note that the line is longer than logrunner's input buffer.
222 </para>
223 </section>
224
225 </chapter>
226
227 </book>
228 </doc>