1JOURNAL.SH(1) User Contributed Perl Documentation JOURNAL.SH(1)
2
3
4
6 BeakerLib - journal - journalling functionality
7
9 Routines for initializing the journalling features and pretty printing
10 journal contents.
11
13 Journalling
14 rlJournalStart
15
16 Initialize the journal file.
17
18 rlJournalStart
19
20 Run on the very beginning of your script to initialize journalling
21 functionality.
22
23 rlJournalEnd
24
25 Summarize the test run and upload the journal file.
26
27 rlJournalEnd
28
29 Run on the very end of your script to print summary of the whole test
30 run, generate OUTPUTFILE and include journal in Beaker logs.
31
32 rlJournalPrint
33
34 Print the content of the journal in pretty xml format.
35
36 rlJournalPrint [type]
37
38 type
39 Can be either 'raw' or 'pretty', with the latter as a default.
40 Raw: xml is in raw form, no indentation etc Pretty: xml is pretty
41 printed, indented, with one record per line
42
43 Example:
44
45 <?xml version="1.0"?>
46 <BEAKER_TEST>
47 <test_id>debugging</test_id>
48 <package>setup</package>
49 <pkgdetails>setup-2.8.9-1.fc12.noarch</pkgdetails>
50 <starttime>2010-02-08 15:17:47</starttime>
51 <endtime>2010-02-08 15:17:47</endtime>
52 <testname>/examples/beakerlib/Sanity/simple</testname>
53 <release>Fedora release 12 (Constantine)</release>
54 <hostname>localhost</hostname>
55 <arch>i686</arch>
56 <purpose>PURPOSE of /examples/beakerlib/Sanity/simple
57 Description: Minimal BeakerLib sanity test
58 Author: Petr Splichal <psplicha@redhat.com>
59
60 This is a minimal sanity test for BeakerLib. It contains a single
61 phase with a couple of asserts. We Just check that the "setup"
62 package is installed and that there is a sane /etc/passwd file.
63 </purpose>
64 <log>
65 <phase endtime="2010-02-08 15:17:47" name="Test" result="PASS"
66 score="0" starttime="2010-02-08 15:17:47" type="FAIL">
67 <test message="Checking for the presence of setup rpm">PASS</test>
68 <test message="File /etc/passwd should exist">PASS</test>
69 <test message="File '/etc/passwd' should contain 'root'">PASS</test>
70 </phase>
71 </log>
72 </BEAKER_TEST>
73
74 rlJournalPrintText
75
76 Print the content of the journal in pretty text format.
77
78 rlJournalPrintText
79
80 Example:
81
82 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
83 :: [ LOG ] :: TEST PROTOCOL
84 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
85
86 :: [ LOG ] :: Test run ID : debugging
87 :: [ LOG ] :: Package : debugging
88 :: [ LOG ] :: Test started : 2010-02-08 14:45:57
89 :: [ LOG ] :: Test finished : 2010-02-08 14:45:58
90 :: [ LOG ] :: Test name :
91 :: [ LOG ] :: Distro: : Fedora release 12 (Constantine)
92 :: [ LOG ] :: Hostname : localhost
93 :: [ LOG ] :: Architecture : i686
94
95 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
96 :: [ LOG ] :: Test description
97 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
98
99 PURPOSE of /examples/beakerlib/Sanity/simple
100 Description: Minimal BeakerLib sanity test
101 Author: Petr Splichal <psplicha@redhat.com>
102
103 This is a minimal sanity test for BeakerLib. It contains a single
104 phase with a couple of asserts. We Just check that the "setup"
105 package is installed and that there is a sane /etc/passwd file.
106
107
108 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
109 :: [ LOG ] :: Test
110 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
111
112 :: [ PASS ] :: Checking for the presence of setup rpm
113 :: [ PASS ] :: File /etc/passwd should exist
114 :: [ PASS ] :: File '/etc/passwd' should contain 'root'
115 :: [ LOG ] :: Duration: 1s
116 :: [ LOG ] :: Assertions: 3 good, 0 bad
117 :: [ PASS ] :: RESULT: Test
118
120 · Petr Muller <pmuller@redhat.com>
121
122 · Jan Hutar <jhutar@redhat.com>
123
124 · Ales Zelinka <azelinka@redhat.com>
125
126 · Petr Splichal <psplicha@redhat.com>
127
128
129
130perl v5.10.1 2010-05-12 JOURNAL.SH(1)