1JOURNAL.SH(1)         User Contributed Perl Documentation        JOURNAL.SH(1)
2
3
4

NAME

6       BeakerLib - journal - journalling functionality
7

DESCRIPTION

9       Routines for initializing the journalling features and pretty printing
10       journal contents.
11

FUNCTIONS

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 &lt;psplicha@redhat.com&gt;
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 [--full-journal]
79
80       --full-journal
81           The options is now deprecated, has no effect and will be removed in
82           one of future versions.
83
84       Example:
85
86           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
87           :: [   LOG    ] :: TEST PROTOCOL
88           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
89
90           :: [   LOG    ] :: Test run ID   : debugging
91           :: [   LOG    ] :: Package       : debugging
92           :: [   LOG    ] :: Test started  : 2010-02-08 14:45:57
93           :: [   LOG    ] :: Test finished : 2010-02-08 14:45:58
94           :: [   LOG    ] :: Test name     :
95           :: [   LOG    ] :: Distro:       : Fedora release 12 (Constantine)
96           :: [   LOG    ] :: Hostname      : localhost
97           :: [   LOG    ] :: Architecture  : i686
98
99           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
100           :: [   LOG    ] :: Test description
101           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
102
103           PURPOSE of /examples/beakerlib/Sanity/simple
104           Description: Minimal BeakerLib sanity test
105           Author: Petr Splichal <psplicha@redhat.com>
106
107           This is a minimal sanity test for BeakerLib. It contains a single
108           phase with a couple of asserts. We Just check that the "setup"
109           package is installed and that there is a sane /etc/passwd file.
110
111
112           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
113           :: [   LOG    ] :: Test
114           ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
115
116           :: [   PASS   ] :: Checking for the presence of setup rpm
117           :: [   PASS   ] :: File /etc/passwd should exist
118           :: [   PASS   ] :: File '/etc/passwd' should contain 'root'
119           :: [   LOG    ] :: Duration: 1s
120           :: [   LOG    ] :: Assertions: 3 good, 0 bad
121           :: [   PASS   ] :: RESULT: Test
122
123       rlGetTestState
124
125       Returns number of failed asserts in so far, 255 if there are more then
126       255 failures.  The precise number is set to ECODE variable.
127
128           rlGetTestState
129
130       rlGetPhaseState
131
132       Returns number of failed asserts in current phase so far, 255 if there
133       are more then 255 failures.  The precise number is set to ECODE
134       variable.
135
136           rlGetPhaseState
137

AUTHORS

139       ·   Petr Muller <pmuller@redhat.com>
140
141       ·   Jan Hutar <jhutar@redhat.com>
142
143       ·   Ales Zelinka <azelinka@redhat.com>
144
145       ·   Petr Splichal <psplicha@redhat.com>
146
147       ·   Dalibor Pospisil <dapospis@redhat.com>
148
149       ·   Jakub Heger <jheger@redhat.com>
150
151
152
153perl v5.30.1                      2020-01-28                     JOURNAL.SH(1)
Impressum