932ccd7da9522f59874fc920c00fe34555d42b44
[third_party/subunit] / NEWS
1 ---------------------
2 subunit release notes
3 ---------------------
4
5 NEXT (In development)
6 ---------------------
7
8 v2 protocol draft included in this release. The v2 protocol trades off human
9 readability for a massive improvement in robustness, the ability to represent
10 concurrent tests in a single stream, cheaper parsing, and that provides
11 significantly better in-line debugging support and structured forwarding
12 of non-test data (such as stdout or stdin data).
13
14 This change includes two new filters (subunit-1to2 and subunit-2to1). Use
15 these filters to convert old streams to v2 and convert v2 streams to v1.
16
17 All the other filters now only parse and emit v2 streams. V2 is still in
18 draft format, so if you want to delay and wait for v2 to be finalised, you
19 should use subunit-2to1 before any serialisation steps take place.
20 With the ability to encapsulate multiple non-test streams, another significant
21 cange is that filters which emit subunit now encapsulate any non-subunit they
22 encounter, labelling it 'stdout'. This permits multiplexing such streams and
23 detangling the stdout streams from each input.
24
25 The subunit libraries (Python etc) have not changed their behaviour: they
26 still emit v1 from their existing API calls. New API's are being added
27 and applications should migrate once their language has those API's available.
28
29 IMPROVEMENTS
30 ~~~~~~~~~~~~
31
32 * v2 protocol draft included in this release.
33   (Robert Collins)
34
35 * Two new Python classes -- ``StreamResultToBytes`` and
36   ``ByteStreamToStreamResult`` handle v2 generation and parsing.
37   (Robert Collins)
38
39 0.0.10
40 ------
41
42 BUG FIXES
43 ~~~~~~~~~
44
45 * make_stream_binary is now public for reuse. (Robert Collins)
46
47 * NAME was not defined in the protocol BNF. (Robert Collins)
48
49 * UnsupportedOperation is available in the Python2.6 io library, so ask
50   forgiveness rather than permission for obtaining it. (Robert Collins)
51
52 * Streams with no fileno() attribute are now supported, but they are not
53   checked for being in binary mode: be sure to take care of that if using
54   the library yourself. (Robert Collins)
55
56 0.0.9
57 -----
58
59 BUG FIXES
60 ~~~~~~~~~
61
62 * All the source files are now included in the distribution tarball.
63   (Arfrever Frehtes Taifersar Arahesis, Robert Collins, #996275)
64
65 * ``python/subunit/tests/test_run.py`` and ``python/subunit/filters.py`` were
66   not included in the 0.0.8 tarball. (Robert Collins)
67
68 * Test ids which include non-ascii unicode characters are now supported.
69   (Robert Collins, #1029866)
70
71 * The ``failfast`` option to ``subunit.run`` will now work. The dependency on
72   testtools has been raised to 0.9.23 to permit this.
73   (Robert Collins, #1090582)
74
75 0.0.8
76 -----
77
78 IMPROVEMENTS
79 ~~~~~~~~~~~~
80
81 * Perl module now correctly outputs "failure" instead of "fail".  (Stewart Smith)
82
83 * Shell functions now output timestamps. (Stewart Smith, Robert Collins)
84
85 * 'subunit2csv' script that converts subunit output to CSV format.
86   (Jonathan Lange)
87
88 * ``TagCollapsingDecorator`` now correctly distinguishes between local and
89   global tags.  (Jonathan Lange)
90
91 * ``TestResultFilter`` always forwards ``time:`` events.
92   (Benji York, Brad Crittenden)
93
94 BUG FIXES
95 ~~~~~~~~~
96
97 * Add 'subunit --no-xfail', which will omit expected failures from the subunit
98   stream. (John Arbash Meinel, #623642)
99
100 * Add 'subunit -F/--only-genuine-failures' which sets all of '--no-skips',
101   '--no-xfail', '--no-passthrough, '--no-success', and gives you just the
102   failure stream. (John Arbash Meinel)
103
104 * Python2.6 support was broken by the fixup feature.
105   (Arfrever Frehtes Taifersar Arahesis, #987490)
106
107 * Python3 support regressed in trunk.
108   (Arfrever Frehtes Taifersar Arahesis, #987514)
109
110 * Python3 support was insufficiently robust in detecting unicode streams.
111   (Robert Collins, Arfrever Frehtes Taifersar Arahesis)
112
113 * Tag support has been implemented for TestProtocolClient.
114   (Robert Collins, #518016)
115
116 * Tags can now be filtered. (Jonathan Lange, #664171)
117
118 * Test suite works with latest testtools (but not older ones - formatting
119   changes only). (Robert Collins)
120
121 0.0.7
122 -----
123
124 The Subunit Python test runner ``python -m subunit.run`` can now report the
125 test ids and also filter via a test id list file thanks to improvements in
126 ``testtools.run``. See the testtools manual, or testrepository - a major
127 user of such functionality.
128
129 Additionally the protocol now has a keyword uxsuccess for Unexpected Success
130 reporting. Older parsers will report tests with this status code as 'lost
131 connection'.
132
133 IMPROVEMENTS
134 ~~~~~~~~~~~~
135
136 * Add ``TimeCollapsingDecorator`` which collapses multiple sequential time()
137   calls into just the first and last. (Jonathan Lange)
138
139 * Add ``TagCollapsingDecorator`` which collapses many tags() calls into one
140   where possible. (Jonathan Lange, Robert Collins)
141
142 * Force flush of writes to stdout in c/tests/test_child.
143   (Jelmer Vernooij, #687611)
144
145 * Provisional Python 3.x support.
146   (Robert Collins, Tres Seaver, Martin[gz], #666819)
147
148 * ``subunit.chunked.Decoder`` Python class takes a new ``strict`` option,
149   which defaults to ``True``. When ``False``, the ``Decoder`` will accept
150   incorrect input that is still unambiguous. i.e. subunit will not barf if
151   a \r is missing from the input. (Martin Pool)
152
153 * ``subunit-filter`` preserves the relative ordering of ``time:`` statements,
154   so you can now use filtered streams to gather data about how long it takes
155   to run a test. (Jonathan Lange, #716554)
156
157 * ``subunit-ls`` now handles a stream with time: instructions that start
158   partway through the stream (which may lead to strange times) more gracefully.
159   (Robert Collins, #785954)
160
161 * ``subunit-ls`` should handle the new test outcomes in Python2.7 better.
162   (Robert Collins, #785953)
163
164 * ``TestResultFilter`` now collapses sequential calls to time().
165   (Jonathan Lange, #567150)
166
167 * ``TestResultDecorator.tags()`` now actually works, and is no longer a buggy
168   copy/paste of ``TestResultDecorator.time()``. (Jonathan Lange, #681828)
169
170 * ``TestResultFilter`` now supports a ``fixup_expected_failures``
171   argument. (Jelmer Vernooij, #755241)
172
173 * The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
174   per ``testtools.run``. This required a dependency bump due to a small
175   API change in ``testtools``. (Robert Collins)
176
177 * The help for subunit-filter was confusing about the behaviour of ``-f`` /
178   ``--no-failure``. (Robert Collins, #703392)
179
180 * The Python2.7 / testtools addUnexpectedSuccess API is now supported. This
181   required adding a new status code to the protocol. (Robert Collins, #654474)
182
183 CHANGES
184 ~~~~~~~
185
186 * testtools 0.9.11 or newer is new needed (due to the Python 3 support).
187   (Robert Collins)
188
189 0.0.6
190 -----
191
192 This release of subunit fixes a number of unicode related bugs. This depends on
193 testtools 0.9.4 and will not function without it. Thanks to Tres Seaver there
194 is also an optional native setup.py file for use with easy_install and the
195 like.
196
197 BUG FIXES
198 ~~~~~~~~~
199
200 * Be consistent about delivering unicode content to testtools StringException
201   class which has become (appropriately) conservative. (Robert Collins)
202
203 * Fix incorrect reference to subunit_test_failf in c/README.
204   (Brad Hards, #524341)
205
206 * Fix incorrect ordering of tags method parameters in TestResultDecorator. This
207   is purely cosmetic as the parameters are passed down with no interpretation.
208   (Robert Collins, #537611)
209
210 * Old style tracebacks with no encoding info are now treated as UTF8 rather
211   than some-random-codec-like-ascii. (Robert Collins)
212
213 * On windows, ProtocolTestCase and TestProtocolClient will set their streams to
214   binary mode by calling into msvcrt; this avoids having their input or output
215   mangled by the default line ending translation on that platform.
216   (Robert Collins, Martin [gz], #579296)
217
218 IMPROVEMENTS
219 ~~~~~~~~~~~~
220
221 * Subunit now has a setup.py for python deployments that are not using
222   distribution packages. (Tres Seaver, #538181)
223
224 * Subunit now supports test discovery by building on the testtools support for
225   it. You can take advantage of it with "python -m subunit.run discover [path]"
226   and see "python -m subunit.run discover --help" for more options.
227
228 * Subunit now uses the improved unicode support in testtools when outputting
229   non-details based test information; this should consistently UTF8 encode such
230   strings.
231
232 * The Python TestProtocolClient now flushes output on startTest and stopTest.
233   (Martin [gz]).
234
235
236 0.0.5
237 -----
238
239 BUG FIXES
240 ~~~~~~~~~
241
242 * make check was failing if subunit wasn't installed due to a missing include
243   path for the test program test_child.
244
245 * make distcheck was failing due to a missing $(top_srcdir) rune.
246
247 IMPROVEMENTS
248 ~~~~~~~~~~~~
249
250 * New filter `subunit-notify` that will show a notification window with test 
251   statistics when the test run finishes.
252
253 * subunit.run will now pipe its output to the command in the 
254   SUBUNIT_FORMATTER environment variable, if set.
255
256 0.0.4
257 -----
258
259 BUG FIXES
260 ~~~~~~~~~
261
262 * subunit2junitxml -f required a value, this is now fixed and -f acts as a
263   boolean switch with no parameter.
264
265 * Building with autoconf 2.65 is now supported.
266
267
268 0.0.3
269 -----
270
271   CHANGES:
272   
273     * License change, by unanimous agreement of contributors to BSD/Apache
274       License Version 2.0. This makes Subunit compatible with more testing
275       frameworks.
276
277   IMPROVEMENTS:
278
279     * CPPUnit is now directly supported: subunit builds a cppunit listener
280       ``libcppunit-subunit``. 
281
282     * In the python API ``addExpectedFailure`` and ``addUnexpectedSuccess``
283       from python 2.7/3.1 are now supported. ``addExpectedFailure`` is
284       serialised as ``xfail``, and ``addUnexpectedSuccess`` as ``success``.
285       The ``ProtocolTestCase`` parser now calls outcomes using an extended
286       API that permits attaching arbitrary MIME resources such as text files
287       log entries and so on. This extended API is being developed with the
288       Python testing community, and is in flux. ``TestResult`` objects that
289       do not support the API will be detected and transparently downgraded
290       back to the regular Python unittest API.
291
292     * INSTALLDIRS can be set to control the perl MakeMaker 'INSTALLDIRS'
293       viarable when installing.
294
295     * Multipart test outcomes are tentatively supported; the exact protocol
296       for them, both serialiser and object is not yet finalised. Testers and
297       early adopters are sought. As part of this and also in an attempt to
298       provider a more precise focus on the wire protocol and toolchain, 
299       Subunit now depends on testtools (http://launchpad.net/testtools)
300       release 0.9.0 or newer.
301
302     * subunit2junitxml supports a new option, --forward which causes it
303       to forward the raw subunit stream in a similar manner to tee. This
304       is used with the -o option to both write a xml report and get some
305       other subunit filter to process the stream.
306
307     * The C library now has ``subunit_test_skip``.
308
309   BUG FIXES:
310
311     * Install progress_model.py correctly.
312
313     * Non-gcc builds will no longer try to use gcc specific flags.
314       (Thanks trondn-norbye)
315
316   API CHANGES:
317
318   INTERNALS:
319
320 0.0.2
321 -----
322
323   CHANGES:
324
325   IMPROVEMENTS:
326
327     * A number of filters now support ``--no-passthrough`` to cause all
328       non-subunit content to be discarded. This is useful when precise control
329       over what is output is required - such as with subunit2junitxml.
330
331     * A small perl parser is now included, and a new ``subunit-diff`` tool
332       using that is included. (Jelmer Vernooij)
333
334     * Subunit streams can now include optional, incremental lookahead
335       information about progress. This allows reporters to make estimates
336       about completion, when such information is available. See the README
337       under ``progress`` for more details.
338
339     * ``subunit-filter`` now supports regex filtering via ``--with`` and
340       ``without`` options. (Martin Pool)
341
342     * ``subunit2gtk`` has been added, a filter that shows a GTK summary of a
343       test stream.
344
345     * ``subunit2pyunit`` has a --progress flag which will cause the bzrlib
346       test reporter to be used, which has a textual progress bar. This requires
347       a recent bzrlib as a minor bugfix was required in bzrlib to support this.
348
349     * ``subunit2junitxml`` has been added. This filter converts a subunit
350       stream to a single JUnit style XML stream using the pyjunitxml
351       python library.
352
353     * The shell functions support skipping via ``subunit_skip_test`` now.
354
355   BUG FIXES:
356
357     * ``xfail`` outcomes are now passed to python TestResult's via
358       addExpectedFailure if it is present on the TestResult. Python 2.6 and
359       earlier which do not have this function will have ``xfail`` outcomes
360       passed through as success outcomes as earlier versions of subunit did.
361
362   API CHANGES:
363
364     * tags are no longer passed around in python via the ``TestCase.tags``
365       attribute. Instead ``TestResult.tags(new_tags, gone_tags)`` is called,
366       and like in the protocol, if called while a test is active only applies
367       to that test. (Robert Collins)
368
369     * ``TestResultFilter`` takes a new optional constructor parameter 
370       ``filter_predicate``.  (Martin Pool)
371
372     * When a progress: directive is encountered in a subunit stream, the
373       python bindings now call the ``progress(offset, whence)`` method on
374       ``TestResult``.
375
376     * When a time: directive is encountered in a subunit stream, the python
377       bindings now call the ``time(seconds)`` method on ``TestResult``.
378
379   INTERNALS:
380
381     * (python) Added ``subunit.test_results.AutoTimingTestResultDecorator``. Most
382       users of subunit will want to wrap their ``TestProtocolClient`` objects
383       in this decorator to get test timing data for performance analysis.
384
385     * (python) ExecTestCase supports passing arguments to test scripts.
386
387     * (python) New helper ``subunit.test_results.HookedTestResultDecorator``
388       which can be used to call some code on every event, without having to
389       implement all the event methods.
390
391     * (python) ``TestProtocolClient.time(a_datetime)`` has been added which
392       causes a timestamp to be output to the stream.