Fix PR10: Gcm_input may loose its input message
[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 createdb: Database</heading>
52 <para>
53 Create and destroy the database.
54 </para>
55 </section>
56
57 <section>
58 <heading>Test upgradedb: Database upgrades</heading>
59 <para>
60 Test the database upgrades in gcm_daemon.
61 Create an old, version 1, database and run gcm_daemon to perform
62 an upgrade to the latest version.
63 Then, create a latest-version database and compare dumps of these
64 database. They should be essentially the same.
65 </para>
66 </section>
67
68 <section>
69 <heading>Test read_messages: Read syslog entries</heading>
70 <para>
71 Create an object in the database and parse a piece of a syslog file.
72 This tests normal operation in which gcm_input reads a syslog file
73 directly.
74 </para>
75 </section>
76
77 <section>
78 <heading>Test read_bad_messages: Read corrupted syslog entries</heading>
79 <para>
80 Create an object  in the database and
81 parse a piece of a syslog file with short and even empty lines.
82 There should be warnings printed on stderr.
83 </para>
84 </section>
85
86 <section>
87 <heading>Test read_without_hostname: Read syslog entries without hostname</heading>
88 <para>
89 Create an object  in the database and
90 try to parse a piece of a syslog file without specifying the hostname.
91 The message should be rejected on account of an unknown host.
92 </para>
93 </section>
94
95 <section>
96 <heading>Test 0005: Read syslog entries without time</heading>
97 <para>
98 Create an object 'kithira.andromeda.nl' in the database and
99 parse a piece of a syslog file without specifying a time.
100 This tests wether an improper time still creates valid data.
101 </para>
102 </section>
103
104 <section>
105 <heading>Test 0009: Service check notifications</heading>
106 <para>
107 Test the service check notifications.
108 Create a database with two objects and no services. After reading two
109 log file fragments for these two objects, gcm_daemon should create
110 'service unknown' notifications, one for each object, as well as a few
111 other notifications.
112
113 This tests problem report nr. 23
114 </para>
115 </section>
116
117 <section>
118 <heading>Test notification_sendmail: Processing log entries</heading>
119 <para>
120 Test the log processing of gcm_daemon
121 Create a database with one object and read a piece of sendmail log
122
123 This tests problem report nrs. 14 through 17
124 </para>
125 </section>
126
127 <section>
128 <heading>Test 0011: Ambiguous log entries</heading>
129 <para>
130 Create an object 'vd.wt.tno.nl' in the database and
131 parse a piece of a apache access file which may be mistaken for an rpm list
132 </para>
133 </section>
134
135 <section>
136 <heading>Test 0012: RPM package list</heading>
137 <para>
138 Create an object and parse an RPM package list.
139 Parameters and properties are created in the database.
140 The first line of the RPM list is empty. This tests whether
141 gcm_input can handle empty lines properly.
142 This tests problem report nr. 30.
143 </para>
144 </section>
145
146 <section>
147 <heading>Test 0013: RPM package updates</heading>
148 <para>
149 Create an object and parse an RPM package list and another RPM package
150 list where some packages are upgraded and removed.
151 Parameters and properties are created in the database.
152 Reading the second list should lead to notifications and additional
153 records in the parameter history table.
154 </para>
155 </section>
156
157 <section>
158 <heading>Test 0014: RPM package update repeats</heading>
159 <para>
160 Create an object and parse an RPM package list and another RPM package
161 list where some packages are upgraded and removed.
162 The second package list is read twice.
163 Parameters and properties are created in the database.
164 Reading the second list should lead to notifications and additional
165 records in the parameter history table.
166 Reading the second list another time should not change anything in the
167 database.
168 This tests PR 31.
169 </para>
170 </section>
171 <section>
172 <heading>Test 0015: Debian package list and repeated updates</heading>
173 <para>
174
175  Debian package list and repeated updates
176
177 This is basically the same test as test 0014, except we are now using
178 a Debian list from 'dpkg -l' instead of RPM.
179 Create an object and parse a Debian package list and another Debian package
180 list where some packages are upgraded and removed.
181 The second package list is read twice.
182 Parameters and properties are created in the database.
183 Reading the second list should lead to notifications and additional
184 records in the parameter history table.
185 Reading the second list another time should not change anything in the
186 database.
187 This tests PR 31.
188 </para>
189
190 </section>
191
192 <section>
193 <heading>Test 0020: Logrunner normal operation</heading>
194 <para>
195 Read a small logfile and check the XML output created
196 by logrunner.
197 Logrunner will put the hostname of the system where the test
198 is run in the ouput file.
199 </para>
200 </section>
201
202 <section>
203 <heading>Test 0021: Logrunner continuation</heading>
204 <para>
205 Read a small logfile in two parts and check the XML output created
206 by logrunner.
207 After reading the log for the first time, additional content is added
208 to the file and logrunner is called a second time.
209 This tests whether logrunner will continue a log file after additional
210 data is appended to that log file.
211 </para>
212 </section>
213
214 <section>
215 <heading>Test 0022: Logrunner long lines</heading>
216 <para>
217 Read a small logfile with a long (> 4096 bytes) line.
218 Logrunner should create an XML message with the long
219 line intact.
220 Note that the line is longer than logrunner's input buffer.
221 </para>
222 </section>
223
224 </chapter>
225
226 </book>
227 </doc>