53
53
Once a ticket is completed, it's status will be updated appropriately and all
54
54
build and test results and logs will be available via the web interface.
57
Exploiting Test Results
58
-----------------------
60
The test runner produces results in the subunit v1 format.
62
The subunit stream can be downloaded from the web interface and processed
63
locally in different ways.
65
Note that the subunit stream contains the dep-8 test results.
67
The subunit v1 format is text only and as such can be read but it's not
68
especially user-friendly:
73
successful: dsc0t-build [ multipart
74
Content-Type: text/plain;charset=utf8
77
Content-Type: text/plain;charset=utf8
85
subunit provide filters to convert a stream into more readable outputs.
88
Converting to the python unittest format
89
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93
$ subunit-1to2 <subunit.stream | subunit2pyunit
95
This filter is appropriate to inspect failures in tests and will produce
100
$ subunit-1to2 <fail.stream | subunit2pyunit
102
tests.test_pass ... ok
104
tests.test_fail ... FAIL
105
======================================================================
106
FAIL: tests.test_fail
108
----------------------------------------------------------------------
109
testtools.testresult.real._StringException: Traceback (most recent call last):
110
File "tests.py", line 31, in test_fail
111
self.assertTrue(False)
112
File "/usr/lib/python2.7/unittest/case.py", line 424, in assertTrue
113
raise self.failureException(msg)
114
AssertionError: False is not true
117
----------------------------------------------------------------------
118
Ran 2 tests in 0.001s
123
Converting to the junitxml format
124
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128
$ subunit-1to2 <subunit.stream | subunit2junitxml >results.xml
130
This produces a 'results.xml' file suitable for jenkins.