This file is indexed.

/usr/share/doc/atheist/html/intro.html is in atheist 0.20110402-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Introduction &mdash; Atheist 0.20110402 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.20110402',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Atheist 0.20110402 documentation" href="index.html" />
    <link rel="next" title="Plugins" href="plugins.html" />
    <link rel="prev" title="Atheist’s documentation" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="plugins.html" title="Plugins"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Atheist’s documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Atheist 0.20110402 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="introduction">
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
<p>Atheist is a simple framework for running test cases. You write small
files in Python language using a set of predefined functions and
classes. In many senses, the concept is quite similar to <em>make</em> or the
SCons framework although Atheist is not a building system at all.</p>
<p>Features:</p>
<ul class="simple">
<li><a class="reference external" href="http://en.wikipedia.org/wiki/Black-box_testing">Black-box testing</a>: system and
acceptance tests. It may execute any kind of external shell program.</li>
<li><a class="reference external" href="http://en.wikipedia.org/wiki/White-box_testing">White-box testing</a> by means of
<a class="reference external" href="http://docs.python.org/library/unittest.html">unitest</a>  and standard
Python functions.</li>
<li><a class="reference external" href="http://en.wikipedia.org/wiki/Doctest">Python doctests</a>.</li>
<li><a class="reference external" href="http://pyunit.sourceforge.net/pyunit.html">Python unittest</a>.</li>
<li>New kinds of &#8220;tests&#8221; by means of plugins.</li>
<li>Plugable pre- and post- condition system.</li>
</ul>
<p>ToDo:</p>
<ul class="simple">
<li>Per-project plugins.</li>
<li>Limit/perf testing.</li>
<li>Remote testing.</li>
<li>Test deployment.</li>
<li>Remote management.</li>
<li>Distributed testing.</li>
</ul>
<div class="section" id="test-objects">
<h2>Test objects<a class="headerlink" href="#test-objects" title="Permalink to this headline"></a></h2>
<p>The Test object is the minimal testing unit. Each Test instance
defines an individual execution (a shell command) that may be
checked for success upon termination. The Test constructor accepts many
parameters that may change the test&#8217;s exception behavior in several
ways. The only mandatory parameter is <tt class="docutils literal"><span class="pre">cmd</span></tt> which is the command to
execute.</p>
<p>The Test object is responsible for executing the command and checking its
termination value. A very basic example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">Test</span><span class="p">(</span><span class="s">&#39;true&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="test-files-testcases">
<h2>Test files (TestCases)<a class="headerlink" href="#test-files-testcases" title="Permalink to this headline"></a></h2>
<p>Test instances need to be defined in text source files (with
<tt class="docutils literal"><span class="pre">.test</span></tt> extension). Although these files are written in a subset of
the Python language, they may be seen as declarative programs. You tell
Atheist what you want to test and even the order, but the decision
about when to run the corresponding action is taken by Atheist; some
of them may be never done.</p>
<p>The file <strong>does not define sequential</strong> imperative sentences. For example,
if you write this in a <tt class="docutils literal"><span class="pre">.test</span></tt> file:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">Test</span><span class="p">(</span><span class="s">&#39;ls /&#39;</span><span class="p">)</span>
<span class="k">print</span> <span class="s">&quot;hello&quot;</span>
</pre></div>
</div>
<p>the <tt class="docutils literal"><span class="pre">print</span></tt> statement will be executed when the test is <strong>LOADED</strong>
and the <tt class="docutils literal"><span class="pre">ls</span></tt> command will run later, when the test is
<strong>EXECUTED</strong>. You must take in mind that the atheist .test file defines
a set of tests. It is not a conventional python program.</p>
<div class="section" id="key-args">
<h3>Key-args<a class="headerlink" href="#key-args" title="Permalink to this headline"></a></h3>
<p>Any Test constructor accepts the next key-val parameters. All of them
are optional. Beside the parameter&#8217;s name appear its type and
default value.</p>
<p><strong>check</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">True</span></tt></p>
<blockquote>
<div>If &#8216;check&#8217; is <tt class="docutils literal"><span class="pre">False</span></tt> there is no consequences when the Task
fails and it is not considered in the final stats.</div></blockquote>
<p><strong>cwd</strong> &#8211; type: <tt class="docutils literal"><span class="pre">str</span></tt></p>
<blockquote>
<div>Directory for the task execution.</div></blockquote>
<p><strong>delay</strong> &#8211; type: <tt class="docutils literal"><span class="pre">int</span></tt>, default: <tt class="docutils literal"><span class="pre">0</span></tt></p>
<blockquote>
<div>Waits for &#8216;delay&#8217; seconds before launching the task actions.</div></blockquote>
<p><strong>desc</strong> &#8211; type: <tt class="docutils literal"><span class="pre">str</span></tt></p>
<blockquote>
<div>One-liner textual task description.</div></blockquote>
<p><strong>detach</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>When <tt class="docutils literal"><span class="pre">detach</span></tt> is <tt class="docutils literal"><span class="pre">False</span></tt> the next task does not start until
the current one ends. When <tt class="docutils literal"><span class="pre">detach</span></tt> is <tt class="docutils literal"><span class="pre">True</span></tt> the next task is
executed even if the current one is still running.</div></blockquote>
<p><strong>env</strong> &#8211; type: <tt class="docutils literal"><span class="pre">str</span></tt>:<tt class="docutils literal"><span class="pre">str</span></tt> map</p>
<blockquote>
<div>A dictionary with shell environment variables.</div></blockquote>
<p><strong>expected</strong> &#8211; type: int</p>
<blockquote>
<div>Expected return code for the command. It may be negative if the process is
killed by a signal.</div></blockquote>
<p><strong>tid</strong> &#8211; type: <tt class="docutils literal"><span class="pre">str</span></tt></p>
<blockquote>
<div>It is a unique string Task IDentifier. You can get a reference to
the task later by giving this value to the <a class="reference internal" href="#get_task" title="get_task"><tt class="xref py py-func docutils literal"><span class="pre">get_task()</span></tt></a> function.</div></blockquote>
<p><strong>must_fail</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>When you expect the program to end with an error but the
return code is not known (i.e: is different from zero). You should
check other conditions (stdout, stderr, generated files, etc) to differentiate
alternative fails.</div></blockquote>
<p id="compositetask"><strong>parent</strong> &#8211; type: CompositeTask</p>
<blockquote>
<div>Use this to aggregate the current test to an already defined CompositeTask.</div></blockquote>
<p><strong>template</strong> &#8211; type: Template list</p>
<blockquote>
<div>A list of templates. See <a class="reference internal" href="#templates"><em>Templates</em></a>.</div></blockquote>
<p><strong>timeout</strong> &#8211; type: int, default: <tt class="docutils literal"><span class="pre">5</span></tt></p>
<blockquote>
<div>The maximum task execution time (in seconds). When the timeout
finishes, Atheist sends the programmed signal to the process. To
avoid timed termination (daemonic task) give <tt class="docutils literal"><span class="pre">timeout=0</span></tt>.</div></blockquote>
<p><strong>save_stderr</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>Store the process&#8217; stderr in a text file. If the <tt class="docutils literal"><span class="pre">stderr</span></tt>
parameter is not set, Atheist will create an unique name for the file.</div></blockquote>
<p><strong>save_stdout</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>Store the process&#8217; stdout in a text file. If the <tt class="docutils literal"><span class="pre">stdout</span></tt>
parameter is not set, Atheist will create an unique name for the file.</div></blockquote>
<p><strong>shell</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>Execute the command within a shell session. <tt class="docutils literal"><span class="pre">bash</span></tt> is the used shell.</div></blockquote>
<p><strong>signal</strong> &#8211; type: int, default: SIGKILL</p>
<blockquote>
<div>It is the signal that Atheist sends to the process when the
<tt class="docutils literal"><span class="pre">timeout</span></tt> finishes.</div></blockquote>
<p><strong>stdout</strong> &#8211; type: <tt class="docutils literal"><span class="pre">str</span></tt></p>
<blockquote>
<div>It is the name of the file where to save the process&#8217; stdout. Setting this
parameters implies save_stdout = True.</div></blockquote>
<p><strong>todo</strong> &#8211; type: <tt class="docutils literal"><span class="pre">bool</span></tt>, default: <tt class="docutils literal"><span class="pre">False</span></tt></p>
<blockquote>
<div>It indicates that the task is not fully verified and it is possible that it
fail unduly. This has no effect when the task ends
successfully.</div></blockquote>
<p>Not all of these key-args are available for all Task classes. See <a class="reference internal" href="#task-types"><em>Task&#8217;s, Test&#8217;s, Commands, Daemons...</em></a>.</p>
</div>
</div>
<div class="section" id="task-results">
<h2>Task results<a class="headerlink" href="#task-results" title="Permalink to this headline"></a></h2>
<p>The execution of any task returns a value, which can be:</p>
<ul class="simple">
<li><strong>FAIL</strong>: The task ran normally but user requirements or conditions were not met. The test <strong>failed</strong>.</li>
<li><strong>OK</strong>: The task ran successfully and all required conditions and/or return values were correct.</li>
<li><strong>NOEXEC</strong>: The task was skipped or it was not executed.</li>
<li><strong>ERROR</strong>: The implementation of the task is wrong and the task execution failed itself.</li>
<li><strong>UNKNOWN</strong>: The task was executed but its result is not known.</li>
<li><strong>TODO</strong>: The task implementation is unstable and it may produce false failures.</li>
</ul>
</div>
<div class="section" id="templates">
<span id="id1"></span><h2>Templates<a class="headerlink" href="#templates" title="Permalink to this headline"></a></h2>
<p>The template is a set of predefined values for Test
key-values. You may use the same configuration for many tests avoiding
to repeat them. This is an example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t1</span> <span class="o">=</span> <span class="n">Template</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">6</span><span class="p">,</span> <span class="n">expected</span><span class="o">=-</span><span class="mi">9</span><span class="p">)</span>
<span class="n">Test</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">,</span> <span class="n">templates</span><span class="o">=</span><span class="p">[</span><span class="n">t1</span><span class="p">])</span>
<span class="n">Test</span><span class="p">(</span><span class="s">&#39;bar&#39;</span><span class="p">,</span> <span class="n">templates</span><span class="o">=</span><span class="p">[</span><span class="n">t1</span><span class="p">])</span>
</pre></div>
</div>
<p>Both tests will be automatically killed after 6 seconds and the
expected return value is -9. This means that these processes receive the
SIGKILL(9) signal. You may specify several templates as a list.</p>
</div>
<div class="section" id="conditions">
<h2>Conditions<a class="headerlink" href="#conditions" title="Permalink to this headline"></a></h2>
<p><em>Conditions</em> are predicates (actually, functors) that check for
specific conditions. Conditions may be specified to be checked before
(pre-conditions) or after (post-conditions) the task execution. If
any of the conditions fail, then the task fails. This is an example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">pre</span>  <span class="o">+=</span> <span class="n">FileExists</span><span class="p">(</span><span class="s">&#39;/path/to/foofile&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">post</span> <span class="o">+=</span> <span class="n">FileContains</span><span class="p">(</span><span class="s">&#39;path/to/barfile&#39;</span><span class="p">,</span> <span class="s">&#39;some text&#39;</span><span class="p">)</span>
</pre></div>
</div>
<div class="section" id="available-builtin-conditions">
<h3>Available builtin conditions<a class="headerlink" href="#available-builtin-conditions" title="Permalink to this headline"></a></h3>
<dl class="function">
<dt id="AtheistVersion">
<tt class="descname">AtheistVersion</tt><big>(</big><em>version</em><big>)</big><a class="headerlink" href="#AtheistVersion" title="Permalink to this definition"></a></dt>
<dd><p>Checks that the installed version of <strong>atheist</strong> is equal or newer than the
given number. This is useful to assure recent or experimental features.</p>
</dd></dl>

<dl class="function">
<dt id="Callback">
<tt class="descname">Callback</tt><big>(</big><em>*args</em><big>)</big><a class="headerlink" href="#Callback" title="Permalink to this definition"></a></dt>
<dd><p>Call the specified function with the given arguments. You must
avoid the use of this condition as much as possible.</p>
</dd></dl>

<dl class="function">
<dt id="DirExists">
<tt class="descname">DirExists</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#DirExists" title="Permalink to this definition"></a></dt>
<dd><p>Checks that directory <em>path</em> exists.</p>
</dd></dl>

<dl class="function">
<dt id="EnvVarDefined">
<tt class="descname">EnvVarDefined</tt><big>(</big><em>name</em><span class="optional">[</span>, <em>value</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#EnvVarDefined" title="Permalink to this definition"></a></dt>
<dd><p>Checks that the environment variable <em>name</em> exists, and optionally has
the value <em>value</em>.</p>
</dd></dl>

<dl class="function">
<dt id="FileExists">
<tt class="descname">FileExists</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#FileExists" title="Permalink to this definition"></a></dt>
<dd><p>Checks that file <em>filename</em> exists.</p>
</dd></dl>

<dl class="function">
<dt id="FileContains">
<tt class="descname">FileContains</tt><big>(</big><em>val</em><span class="optional">[</span>, <em>filename=task.stdout</em>, <em>strip=''</em>, <em>whole=False</em>, <em>times=1</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#FileContains" title="Permalink to this definition"></a></dt>
<dd><p>Checks that file <em>filename</em> exists and contains <em>val</em>, which may be a
string or a string list.</p>
<p>If <em>whole</em> is <tt class="docutils literal"><span class="pre">False</span></tt> (default) val must be a strip and the whole
content of file must be equal to <em>val</em>.</p>
<p>Otherwise, the file must contain <strong>at least</strong> <em>times</em>
occurrences of <em>val</em>. The default value for <em>filename</em> is the stdout of
the corresponding task, and it implies <tt class="docutils literal"><span class="pre">save_stdout=True</span></tt>. This
implies also the automatic creation of a FileExists condition for
that file.</p>
<p>The file content may be stripped by means of <em>strip</em> argument. No
stripping by default.</p>
</dd></dl>

<dl class="function">
<dt id="FileEquals">
<tt class="descname">FileEquals</tt><big>(</big><em>filename1</em><span class="optional">[</span>, <em>filename2=task.stdout</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#FileEquals" title="Permalink to this definition"></a></dt>
<dd><p>Checks that the contents of <em>filename1</em> and <em>filename2</em> are
identical. The default value for <em>filename2</em> is the stdout of the
current task, and it implies <tt class="docutils literal"><span class="pre">save_stdout=True</span></tt>.</p>
</dd></dl>

<dl class="function">
<dt id="OpenPort">
<tt class="descname">OpenPort</tt><big>(</big><em>port</em><span class="optional">[</span>, <em>host='localhost'</em><span class="optional">[</span>, <em>proto='tcp'</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#OpenPort" title="Permalink to this definition"></a></dt>
<dd><p>Checks that port number <em>port</em> is open, i.e., a process is listening to it.</p>
</dd></dl>

<dl class="function">
<dt id="ProcessRunning">
<tt class="descname">ProcessRunning</tt><big>(</big><em>pid</em><big>)</big><a class="headerlink" href="#ProcessRunning" title="Permalink to this definition"></a></dt>
<dd><p>Checks that the given PID belongs to a running process.</p>
</dd></dl>

<p>There are other available conditions as plugins.</p>
</div>
<div class="section" id="condition-decorators">
<h3>Condition decorators<a class="headerlink" href="#condition-decorators" title="Permalink to this headline"></a></h3>
<dl class="function">
<dt id="Not">
<tt class="descname">Not</tt><big>(</big><em>condition</em><big>)</big><a class="headerlink" href="#Not" title="Permalink to this definition"></a></dt>
<dd><p>It is True when <em>condition</em> is evaluated as False.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="s">&#39;rm foo_file&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">pre</span> <span class="o">+=</span> <span class="n">Not</span><span class="p">(</span><span class="n">FileExists</span><span class="p">(</span><span class="n">foo_file</span><span class="p">))</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="Poll">
<tt class="descname">Poll</tt><big>(</big><em>condition</em><span class="optional">[</span>, <em>interval=1</em><span class="optional">[</span>, <em>timeout=5</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Poll" title="Permalink to this definition"></a></dt>
<dd><p>Checks <em>condition</em> every <em>interval</em> seconds, stopping after <em>timeout</em>
seconds or when its value becomes True.</p>
<p>In the next example, the task waits (a maximum of 5 seconds) for the <tt class="docutils literal"><span class="pre">nc</span></tt> server to become
ready before continuing:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="s">&#39;nc -l -p 2000&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">post</span> <span class="o">+=</span> <span class="n">Poll</span><span class="p">(</span><span class="n">OpenPort</span><span class="p">(</span><span class="mi">2000</span><span class="p">))</span>
</pre></div>
</div>
</dd></dl>

<p>Condition decorators may be combined. The following example shows a task that waits
for an environment variable to be removed before executing the command:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="s">&#39;command&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">pre</span> <span class="o">+=</span> <span class="n">Poll</span><span class="p">(</span><span class="n">Not</span><span class="p">(</span><span class="n">EnvVarDefined</span><span class="p">(</span><span class="s">&#39;WAIT_FLAG&#39;</span><span class="p">)),</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
</pre></div>
</div>
<p>Note that the effect of Poll(Not(condition)) is not the same that Not(Poll(condition)).</p>
</div>
</div>
<div class="section" id="task-s-test-s-commands-daemons">
<span id="task-types"></span><h2>Task&#8217;s, Test&#8217;s, Commands, Daemons...<a class="headerlink" href="#task-s-test-s-commands-daemons" title="Permalink to this headline"></a></h2>
<p><tt class="docutils literal"><span class="pre">Task</span></tt> is the base class for all executable items. <tt class="docutils literal"><span class="pre">Test</span></tt> is-a
<tt class="docutils literal"><span class="pre">Task</span></tt> that runs a shell command but other kind of <tt class="docutils literal"><span class="pre">Task</span></tt> are
possible:</p>
<dl class="docutils">
<dt><strong>Command</strong></dt>
<dd><p class="first">It is a non-checked <tt class="docutils literal"><span class="pre">Test</span></tt>. Command is exactly the same that a Test
with a <tt class="docutils literal"><span class="pre">check=False</span></tt> parameter.</p>
<p class="last">The Commands (or other non-checked Tasks) are not considered in
results counting.</p>
</dd>
<dt><strong>Daemon</strong></dt>
<dd><p class="first">Command shortcut for detached commands. Predefined parameters are:</p>
<ul class="last simple">
<li><tt class="docutils literal"><span class="pre">detach</span> <span class="pre">=</span> <span class="pre">True</span></tt></li>
<li><tt class="docutils literal"><span class="pre">expected</span> <span class="pre">=</span> <span class="pre">-9</span></tt> (sigkilled)</li>
<li><tt class="docutils literal"><span class="pre">timeout</span> <span class="pre">=</span> <span class="pre">None</span></tt> (runs &#8220;forerver&#8221;)</li>
<li><tt class="docutils literal"><span class="pre">check</span> <span class="pre">=</span> <span class="pre">False</span></tt></li>
</ul>
</dd>
<dt><strong>TestFunc</strong></dt>
<dd>Check the return value of arbitrary Python functions or methods. A return
value of 0 means success, otherwise is a error code. For unit
testing, prefer <a href="#id2"><span class="problematic" id="id3">`unittestcase`_</span></a> instead of TestFunc.</dd>
</dl>
<p>There are other available Task subclasses as plugins.</p>
</div>
<div class="section" id="function-utilities">
<h2>Function utilities<a class="headerlink" href="#function-utilities" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="get_task">
<tt class="descname">get_task</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#get_task" title="Permalink to this definition"></a></dt>
<dd><p>Returns the task whose <tt class="docutils literal"><span class="pre">tid</span></tt> attribute is <em>name</em>.
ToDo: [include a sample here]</p>
</dd></dl>

<dl class="function">
<dt id="load">
<tt class="descname">load</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#load" title="Permalink to this definition"></a></dt>
<dd><p>Makes possible to reuse atheist or python code in other
files. <tt class="docutils literal"><span class="pre">load()</span></tt> returns a module-like object that may be used to
access to functions, classes and variables defined in the &#8220;loaded&#8221;
module. All atheist classes are available within the loaded modules:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">common</span> <span class="o">=</span> <span class="n">load</span><span class="p">(</span><span class="s">&quot;files/common.py&quot;</span><span class="p">)</span>

<span class="n">Test</span><span class="p">(</span><span class="s">&quot;./server </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">common</span><span class="o">.</span><span class="n">server_params</span><span class="p">())</span>
</pre></div>
</div>
</dd></dl>

<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Previous <tt class="docutils literal"><span class="pre">include()</span></tt> function is not supported any more.</p>
</div>
</div>
<div class="section" id="variable-substitutions">
<h2>Variable substitutions<a class="headerlink" href="#variable-substitutions" title="Permalink to this headline"></a></h2>
<p>Test files may include some substitutable variable. This is useful
to locate test-relevant related files. You must write the
symbol &#8216;$&#8217; preceding each one of the next words:</p>
<dl class="docutils">
<dt><strong>basedir</strong></dt>
<dd>is the name of the directory where atheist was
executed. Usually this is a <tt class="docutils literal"><span class="pre">tests</span></tt> directory into your project.</dd>
<dt><strong>dirname</strong></dt>
<dd>is the name of the directory where the testfile is.</dd>
<dt><strong>fname</strong></dt>
<dd>is the path to the testfile without its extension (.test).</dd>
<dt><strong>testname</strong></dt>
<dd>is just the name of the testfile, without extension nor directory
path.</dd>
</dl>
<p>For example, for the following <tt class="docutils literal"><span class="pre">vars.test</span></tt> file:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">Test</span><span class="p">(</span><span class="s">&quot;echo $basedir $dirname $fname $testname&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>When you run atheist, you get:</p>
<div class="highlight-python"><div class="highlight"><pre>~/sample$ atheist -i2 tests/vars.test
[ OK ] Test case: ./tests/substitutions.test
[ OK ] +- T-1   ( 0: 0)  echo . ./tests ./tests/vars vars
Total:  ALL OK!!  - 0.24s - 1 test
</pre></div>
</div>
</div>
<div class="section" id="hooks-setup-and-teardown">
<h2>hooks: setup and teardown<a class="headerlink" href="#hooks-setup-and-teardown" title="Permalink to this headline"></a></h2>
<p>You may write tasks to execute before and after <strong>each</strong> test file. To do
so, just put this tasks in files called <tt class="docutils literal"><span class="pre">_setup.test</span></tt> and
<tt class="docutils literal"><span class="pre">_teardown.test</span></tt>.</p>
</div>
<div class="section" id="clean-up">
<h2>Clean-up<a class="headerlink" href="#clean-up" title="Permalink to this headline"></a></h2>
<p>When your task creates files you may track them for automatic
cleaning. Just add their filenames to the task <tt class="docutils literal"><span class="pre">gen</span></tt> attribute. Here&#8217;s an
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">t</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="s">&#39;touch foo&#39;</span><span class="p">)</span>
<span class="n">t</span><span class="o">.</span><span class="n">gen</span> <span class="o">+=</span> <span class="s">&#39;foo&#39;</span>
</pre></div>
</div>
<p>You may specify one o more filenames (as a string list).</p>
<p>If you want the generated files not to be automatically removed for
manual inspection of the results, you must specify the <tt class="docutils literal"><span class="pre">--dirty</span></tt> option
(see below). To clean-up these files later, specify the <tt class="docutils literal"><span class="pre">-C</span></tt> option.</p>
</div>
</div>
<div class="section" id="invoking-atheist">
<h1>Invoking Atheist<a class="headerlink" href="#invoking-atheist" title="Permalink to this headline"></a></h1>
<dl class="cmdoption">
<dt id="cmdoption-atheist-h">
<span id="cmdoption-atheist--help"></span><tt class="descname">-h</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--help</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-h" title="Permalink to this definition"></a></dt>
<dd><p>Show basic help information.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-a">
<span id="cmdoption-atheist--task-args"></span><tt class="descname">-a</tt><tt class="descclassname"> ARGS</tt><tt class="descclassname">, </tt><tt class="descname">--task-args</tt><tt class="descclassname">=ARGS</tt><a class="headerlink" href="#cmdoption-atheist-a" title="Permalink to this definition"></a></dt>
<dd><p>Colon-separated options for the tests.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-b">
<span id="cmdoption-atheist--base-dir"></span><tt class="descname">-b</tt><tt class="descclassname"> PATH</tt><tt class="descclassname">, </tt><tt class="descname">--base-dir</tt><tt class="descclassname">=PATH</tt><a class="headerlink" href="#cmdoption-atheist-b" title="Permalink to this definition"></a></dt>
<dd><p>Change working directory.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-C">
<span id="cmdoption-atheist--clean-only"></span><tt class="descname">-C</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--clean-only</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-C" title="Permalink to this definition"></a></dt>
<dd><p>Don&#8217;t execute anything, only remove generated files.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-d">
<span id="cmdoption-atheist--describe"></span><tt class="descname">-d</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--describe</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-d" title="Permalink to this definition"></a></dt>
<dd><p>Describe tasks but don&#8217;t execute anything.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-e">
<span id="cmdoption-atheist--stderr"></span><tt class="descname">-e</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--stderr</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-e" title="Permalink to this definition"></a></dt>
<dd><p>Print the test process&#8217; stderr.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-f">
<span id="cmdoption-atheist--out-on-fail"></span><tt class="descname">-f</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--out-on-fail</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-f" title="Permalink to this definition"></a></dt>
<dd><p>Print task output, but only if it fails.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-g">
<span id="cmdoption-atheist--gen-template"></span><tt class="descname">-g</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--gen-template</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-g" title="Permalink to this definition"></a></dt>
<dd><p>Generate a test file template with default values.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-i">
<span id="cmdoption-atheist--report-detail"></span><tt class="descname">-i</tt><tt class="descclassname"> LEVEL</tt><tt class="descclassname">, </tt><tt class="descname">--report-detail</tt><tt class="descclassname">=LEVEL</tt><a class="headerlink" href="#cmdoption-atheist-i" title="Permalink to this definition"></a></dt>
<dd><p>Verbosity level (0:nothing, [1:case], 2:task, 3:composite, 4:condition)</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-j">
<span id="cmdoption-atheist--skip-hooks"></span><tt class="descname">-j</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--skip-hooks</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-j" title="Permalink to this definition"></a></dt>
<dd><p>Skip _setup and _teardown files.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-k">
<span id="cmdoption-atheist--keep-going"></span><tt class="descname">-k</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--keep-going</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-k" title="Permalink to this definition"></a></dt>
<dd><p>Continue despite failed tests.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-l">
<span id="cmdoption-atheist--list"></span><tt class="descname">-l</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--list</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-l" title="Permalink to this definition"></a></dt>
<dd><p>List tests but do not execute them.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-o">
<span id="cmdoption-atheist--stdout"></span><tt class="descname">-o</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--stdout</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-o" title="Permalink to this definition"></a></dt>
<dd><p>Print the test process&#8217; stdout.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-p">
<span id="cmdoption-atheist--plugin-dir"></span><tt class="descname">-p</tt><tt class="descclassname"> PATH</tt><tt class="descclassname">, </tt><tt class="descname">--plugin-dir</tt><tt class="descclassname">=PATH</tt><a class="headerlink" href="#cmdoption-atheist-p" title="Permalink to this definition"></a></dt>
<dd><p>Load plugins from that directory (may be given several times).</p>
<p>Print the test process&#8217; stdout.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-q">
<span id="cmdoption-atheist--quiet"></span><tt class="descname">-q</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--quiet</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-q" title="Permalink to this definition"></a></dt>
<dd><p>Do not show result summary nor warnings, only totals.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-r">
<span id="cmdoption-atheist--random"></span><tt class="descname">-r</tt><tt class="descclassname"> RANDOM</tt><tt class="descclassname">, </tt><tt class="descname">--random</tt><tt class="descclassname">=RANDOM</tt><a class="headerlink" href="#cmdoption-atheist-r" title="Permalink to this definition"></a></dt>
<dd><p>Run testcases in random order using the specified seed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-s">
<span id="cmdoption-atheist--script"></span><tt class="descname">-s</tt><tt class="descclassname"> INLINE</tt><tt class="descclassname">, </tt><tt class="descname">--script</tt><tt class="descclassname">=INLINE</tt><a class="headerlink" href="#cmdoption-atheist-s" title="Permalink to this definition"></a></dt>
<dd><p>Specifies command line script.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-t">
<span id="cmdoption-atheist--time-tag"></span><tt class="descname">-t</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--time-tag</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-t" title="Permalink to this definition"></a></dt>
<dd><p>Include time info in the logs.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-u">
<span id="cmdoption-atheist--until-failure"></span><tt class="descname">-u</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--until-failure</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-u" title="Permalink to this definition"></a></dt>
<dd><p>Repeat tests until something fails.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-v">
<span id="cmdoption-atheist--verbose"></span><tt class="descname">-v</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--verbose</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist-v" title="Permalink to this definition"></a></dt>
<dd><p>Increase verbosity.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-w">
<span id="cmdoption-atheist--workers"></span><tt class="descname">-w</tt><tt class="descclassname"> WORKERS</tt><tt class="descclassname">, </tt><tt class="descname">--workers</tt><tt class="descclassname">=WORKERS</tt><a class="headerlink" href="#cmdoption-atheist-w" title="Permalink to this definition"></a></dt>
<dd><p>Number of simultaneous tasks. &#8216;0&#8217; allows atheist to choose the number. Default is 1.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist-x">
<span id="cmdoption-atheist--exec"></span><tt class="descname">-x</tt><tt class="descclassname"> COMMAND</tt><tt class="descclassname">, </tt><tt class="descname">--exec</tt><tt class="descclassname">=COMMAND</tt><a class="headerlink" href="#cmdoption-atheist-x" title="Permalink to this definition"></a></dt>
<dd><p>Exec COMMAND like in &#8220;Test(COMMAND, shell=True)&#8221;</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--case-time">
<tt class="descname">--case-time</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--case-time" title="Permalink to this definition"></a></dt>
<dd><p>Print case execution time in reports</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--cols">
<tt class="descname">--cols</tt><tt class="descclassname">=WIDTH</tt><a class="headerlink" href="#cmdoption-atheist--cols" title="Permalink to this definition"></a></dt>
<dd><p>Set terminal width (in chars).</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--config">
<tt class="descname">--config</tt><tt class="descclassname">=FILE</tt><a class="headerlink" href="#cmdoption-atheist--config" title="Permalink to this definition"></a></dt>
<dd><p>Alternate config file.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--dirty">
<tt class="descname">--dirty</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--dirty" title="Permalink to this definition"></a></dt>
<dd><p>Don&#8217;t remove generated files after test execution.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--disable-bar">
<tt class="descname">--disable-bar</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--disable-bar" title="Permalink to this definition"></a></dt>
<dd><p>Don&#8217;t show progress bar.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--ignore">
<tt class="descname">--ignore</tt><tt class="descclassname">=PATTERN</tt><a class="headerlink" href="#cmdoption-atheist--ignore" title="Permalink to this definition"></a></dt>
<dd><p>Files to ignore (glob patterns) separated with semicolon.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--log">
<tt class="descname">--log</tt><tt class="descclassname">=LOG</tt><a class="headerlink" href="#cmdoption-atheist--log" title="Permalink to this definition"></a></dt>
<dd><p>List tasks but do not execute them.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--plain">
<tt class="descname">--plain</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--plain" title="Permalink to this definition"></a></dt>
<dd><p>Avoid color codes in console output.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--save-stdout">
<tt class="descname">--save-stdout</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--save-stdout" title="Permalink to this definition"></a></dt>
<dd><p>Save stdout of all tasks</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--save-stderr">
<tt class="descname">--save-stderr</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--save-stderr" title="Permalink to this definition"></a></dt>
<dd><p>Save stderr of all tasks</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--version">
<tt class="descname">--version</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-atheist--version" title="Permalink to this definition"></a></dt>
<dd><p>Atheist version</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--notify-jabber">
<tt class="descname">--notify-jabber</tt><tt class="descclassname">=JABBER</tt><a class="headerlink" href="#cmdoption-atheist--notify-jabber" title="Permalink to this definition"></a></dt>
<dd><p>Notify failed tests to the given jabber account (may be given several times).</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-atheist--notify-smtp">
<tt class="descname">--notify-smtp</tt><tt class="descclassname">=MAIL</tt><a class="headerlink" href="#cmdoption-atheist--notify-smtp" title="Permalink to this definition"></a></dt>
<dd><p>Notify failed tests to the given email address (may be given several times).</p>
</dd></dl>

<div class="section" id="logging-control">
<h2>Logging control<a class="headerlink" href="#logging-control" title="Permalink to this headline"></a></h2>
<p><strong>[ToDo]</strong></p>
</div>
<div class="section" id="result-report">
<h2>Result report<a class="headerlink" href="#result-report" title="Permalink to this headline"></a></h2>
<p><strong>[ToDo]</strong></p>
</div>
</div>
<div class="section" id="config-files">
<h1>Config files<a class="headerlink" href="#config-files" title="Permalink to this headline"></a></h1>
<p><strong>[ToDo]</strong></p>
</div>
<div class="section" id="notifications-other-reporters">
<h1>Notifications (other reporters)<a class="headerlink" href="#notifications-other-reporters" title="Permalink to this headline"></a></h1>
<p>You may use Atheist to monitor the proper working of any application. It
may send you notifications when something is wrong. The easiest way is to
run a testcase with <tt class="docutils literal"><span class="pre">cron</span></tt> specifying one <tt class="docutils literal"><span class="pre">--notify-*</span></tt> command-line
argument. Currently, two notificators are implemented:</p>
<dl class="docutils">
<dt><strong>Email</strong></dt>
<dd><p class="first">The destination is a email account using the SMTP
protocol. Atheist does not require an SMTP server or smarthost. You
only need to configure an email account that will be used by Atheist
to send mail to any destination. That information must be written in
the <tt class="docutils literal"><span class="pre">~/.atheist/config</span></tt> configuration file. This is an example:</p>
<div class="last highlight-python"><div class="highlight"><pre>[smtp]
host = smtp.server.org
port = 587
user = atheist.notify@server.org
pasw = somesecret
</pre></div>
</div>
</dd>
<dt><strong>Jabber</strong></dt>
<dd><p class="first">You must indicate a jabber account that will be used by
Atheist to send notification messages to any other jabber
account. The destination account must accept this contact
previously. The following is an example for the configuration in the
<tt class="docutils literal"><span class="pre">~/.atheist/config</span></tt> file:</p>
<div class="last highlight-python"><div class="highlight"><pre>[jabber]
user = atheist.notify@server.org
pasw = anothersecret
</pre></div>
</div>
</dd>
</dl>
<p>To ask for a notification you just need to specify a test file and
one or more destinations. For example:</p>
<div class="highlight-python"><div class="highlight"><pre>$ atheist --notify-jabber John.Doe@jabber.info test/some_test.test
</pre></div>
</div>
<p>It is possible to give several &#8211;notify-* arguments in the same
command-line to send notifications to different destinations.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Introduction</a><ul>
<li><a class="reference internal" href="#test-objects">Test objects</a></li>
<li><a class="reference internal" href="#test-files-testcases">Test files (TestCases)</a><ul>
<li><a class="reference internal" href="#key-args">Key-args</a></li>
</ul>
</li>
<li><a class="reference internal" href="#task-results">Task results</a></li>
<li><a class="reference internal" href="#templates">Templates</a></li>
<li><a class="reference internal" href="#conditions">Conditions</a><ul>
<li><a class="reference internal" href="#available-builtin-conditions">Available builtin conditions</a></li>
<li><a class="reference internal" href="#condition-decorators">Condition decorators</a></li>
</ul>
</li>
<li><a class="reference internal" href="#task-s-test-s-commands-daemons">Task&#8217;s, Test&#8217;s, Commands, Daemons...</a></li>
<li><a class="reference internal" href="#function-utilities">Function utilities</a></li>
<li><a class="reference internal" href="#variable-substitutions">Variable substitutions</a></li>
<li><a class="reference internal" href="#hooks-setup-and-teardown">hooks: setup and teardown</a></li>
<li><a class="reference internal" href="#clean-up">Clean-up</a></li>
</ul>
</li>
<li><a class="reference internal" href="#invoking-atheist">Invoking Atheist</a><ul>
<li><a class="reference internal" href="#logging-control">Logging control</a></li>
<li><a class="reference internal" href="#result-report">Result report</a></li>
</ul>
</li>
<li><a class="reference internal" href="#config-files">Config files</a></li>
<li><a class="reference internal" href="#notifications-other-reporters">Notifications (other reporters)</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Atheist&#8217;s documentation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="plugins.html"
                        title="next chapter">Plugins</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/intro.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="plugins.html" title="Plugins"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Atheist’s documentation"
             >previous</a> |</li>
        <li><a href="index.html">Atheist 0.20110402 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009,2010, David Villa.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>