2edf7369d9b7d53d32f1d430c32b80ac04664599
[nivanova/samba-autobuild/.git] / lib / subunit / NEWS
1 ---------------------
2 subunit release notes
3 ---------------------
4
5 NEXT (In development)
6 ---------------------
7
8 The Subunit Python test runner ``python -m subunit.run`` can now report the
9 test ids and also filter via a test id list file thanks to improvements in
10 ``testtools.run``. See the testtools manual, or testrepository - a major
11 user of such functionality.
12
13 Additionally the protocol now has a keyword uxsuccess for Unexpected Success
14 reporting. Older parsers will report tests with this status code as 'lost
15 connection'.
16
17 IMPROVEMENTS
18 ~~~~~~~~~~~~
19
20 * Add ``TimeCollapsingDecorator`` which collapses multiple sequential time()
21   calls into just the first and last. (Jonathan Lange)
22
23 * Add ``TagCollapsingDecorator`` which collapses many tags() calls into one
24   where possible. (Jonathan Lange, Robert Collins)
25
26 * Force flush of writes to stdout in c/tests/test_child.
27   (Jelmer Vernooij, #687611)
28
29 * Perl module now correctly outputs "failure" instead of "fail".  (Stewart Smith)
30
31 * Provisional Python 3.x support.
32   (Robert Collins, Tres Seaver, Martin[gz], #666819)
33
34 * Shell functions now output timestamps. (Stewart Smith)
35
36 * ``subunit.chunked.Decoder`` Python class takes a new ``strict`` option,
37   which defaults to ``True``. When ``False``, the ``Decoder`` will accept
38   incorrect input that is still unambiguous. i.e. subunit will not barf if
39   a \r is missing from the input. (Martin Pool)
40
41 * ``subunit-filter`` preserves the relative ordering of ``time:`` statements,
42   so you can now use filtered streams to gather data about how long it takes
43   to run a test. (Jonathan Lange, #716554)
44
45 * ``subunit-ls`` now handles a stream with time: instructions that start
46   partway through the stream (which may lead to strange times) more gracefully.
47   (Robert Collins, #785954)
48
49 * ``subunit-ls`` should handle the new test outcomes in Python2.7 better.
50   (Robert Collins, #785953)
51
52 * ``TestResultFilter`` now collapses sequential calls to time().
53   (Jonathan Lange, #567150)
54
55 * ``TestResultDecorator.tags()`` now actually works, and is no longer a buggy
56   copy/paste of ``TestResultDecorator.time()``. (Jonathan Lange, #681828)
57
58 * ``TestResultFilter`` now supports a ``fixup_expected_failures``
59   argument. (Jelmer Vernooij, #755241)
60
61 * The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
62   per ``testtools.run``. This required a dependency bump due to a small
63   API change in ``testtools``. (Robert Collins)
64
65 * The help for subunit-filter was confusing about the behaviour of ``-f`` /
66   ``--no-failure``. (Robert Collins, #703392)
67
68 * The Python2.7 / testtools addUnexpectedSuccess API is now supported. This
69   required adding a new status code to the protocol. (Robert Collins, #654474)
70
71 BUG FIXES
72 ~~~~~~~~~
73
74 * Add 'subunit --no-xfail', which will omit expected failures from the subunit
75   stream. (John Arbash Meinel, #623642)
76
77 * Add 'subunit -F/--only-genuine-failures' which sets all of '--no-skips',
78   '--no-xfail', '--no-passthrough, '--no-success', and gives you just the
79   failure stream. (John Arbash Meinel)
80
81 CHANGES
82 ~~~~~~~
83
84 * Newer testtools is needed as part of the Python 3 support. (Robert Collins)
85
86 0.0.6
87 -----
88
89 This release of subunit fixes a number of unicode related bugs. This depends on
90 testtools 0.9.4 and will not function without it. Thanks to Tres Seaver there
91 is also an optional native setup.py file for use with easy_install and the
92 like.
93
94 BUG FIXES
95 ~~~~~~~~~
96
97 * Be consistent about delivering unicode content to testtools StringException
98   class which has become (appropriately) conservative. (Robert Collins)
99
100 * Fix incorrect reference to subunit_test_failf in c/README.
101   (Brad Hards, #524341)
102
103 * Fix incorrect ordering of tags method parameters in TestResultDecorator. This
104   is purely cosmetic as the parameters are passed down with no interpretation.
105   (Robert Collins, #537611)
106
107 * Old style tracebacks with no encoding info are now treated as UTF8 rather
108   than some-random-codec-like-ascii. (Robert Collins)
109
110 * On windows, ProtocolTestCase and TestProtocolClient will set their streams to
111   binary mode by calling into msvcrt; this avoids having their input or output
112   mangled by the default line ending translation on that platform.
113   (Robert Collins, Martin [gz], #579296)
114
115 IMPROVEMENTS
116 ~~~~~~~~~~~~
117
118 * Subunit now has a setup.py for python deployments that are not using
119   distribution packages. (Tres Seaver, #538181)
120
121 * Subunit now supports test discovery by building on the testtools support for
122   it. You can take advantage of it with "python -m subunit.run discover [path]"
123   and see "python -m subunit.run discover --help" for more options.
124
125 * Subunit now uses the improved unicode support in testtools when outputting
126   non-details based test information; this should consistently UTF8 encode such
127   strings.
128
129 * The Python TestProtocolClient now flushes output on startTest and stopTest.
130   (Martin [gz]).
131
132
133 0.0.5
134 -----
135
136 BUG FIXES
137 ~~~~~~~~~
138
139 * make check was failing if subunit wasn't installed due to a missing include
140   path for the test program test_child.
141
142 * make distcheck was failing due to a missing $(top_srcdir) rune.
143
144 IMPROVEMENTS
145 ~~~~~~~~~~~~
146
147 * New filter `subunit-notify` that will show a notification window with test 
148   statistics when the test run finishes.
149
150 * subunit.run will now pipe its output to the command in the 
151   SUBUNIT_FORMATTER environment variable, if set.
152
153 0.0.4
154 -----
155
156 BUG FIXES
157 ~~~~~~~~~
158
159 * subunit2junitxml -f required a value, this is now fixed and -f acts as a
160   boolean switch with no parameter.
161
162 * Building with autoconf 2.65 is now supported.
163
164
165 0.0.3
166 -----
167
168   CHANGES:
169   
170     * License change, by unanimous agreement of contributors to BSD/Apache
171       License Version 2.0. This makes Subunit compatible with more testing
172       frameworks.
173
174   IMPROVEMENTS:
175
176     * CPPUnit is now directly supported: subunit builds a cppunit listener
177       ``libcppunit-subunit``. 
178
179     * In the python API ``addExpectedFailure`` and ``addUnexpectedSuccess``
180       from python 2.7/3.1 are now supported. ``addExpectedFailure`` is
181       serialised as ``xfail``, and ``addUnexpectedSuccess`` as ``success``.
182       The ``ProtocolTestCase`` parser now calls outcomes using an extended
183       API that permits attaching arbitrary MIME resources such as text files
184       log entries and so on. This extended API is being developed with the
185       Python testing community, and is in flux. ``TestResult`` objects that
186       do not support the API will be detected and transparently downgraded
187       back to the regular Python unittest API.
188
189     * INSTALLDIRS can be set to control the perl MakeMaker 'INSTALLDIRS'
190       viarable when installing.
191
192     * Multipart test outcomes are tentatively supported; the exact protocol
193       for them, both serialiser and object is not yet finalised. Testers and
194       early adopters are sought. As part of this and also in an attempt to
195       provider a more precise focus on the wire protocol and toolchain, 
196       Subunit now depends on testtools (http://launchpad.net/testtools)
197       release 0.9.0 or newer.
198
199     * subunit2junitxml supports a new option, --forward which causes it
200       to forward the raw subunit stream in a similar manner to tee. This
201       is used with the -o option to both write a xml report and get some
202       other subunit filter to process the stream.
203
204     * The C library now has ``subunit_test_skip``.
205
206   BUG FIXES:
207
208     * Install progress_model.py correctly.
209
210     * Non-gcc builds will no longer try to use gcc specific flags.
211       (Thanks trondn-norbye)
212
213   API CHANGES:
214
215   INTERNALS:
216
217 0.0.2
218 -----
219
220   CHANGES:
221
222   IMPROVEMENTS:
223
224     * A number of filters now support ``--no-passthrough`` to cause all
225       non-subunit content to be discarded. This is useful when precise control
226       over what is output is required - such as with subunit2junitxml.
227
228     * A small perl parser is now included, and a new ``subunit-diff`` tool
229       using that is included. (Jelmer Vernooij)
230
231     * Subunit streams can now include optional, incremental lookahead
232       information about progress. This allows reporters to make estimates
233       about completion, when such information is available. See the README
234       under ``progress`` for more details.
235
236     * ``subunit-filter`` now supports regex filtering via ``--with`` and
237       ``without`` options. (Martin Pool)
238
239     * ``subunit2gtk`` has been added, a filter that shows a GTK summary of a
240       test stream.
241
242     * ``subunit2pyunit`` has a --progress flag which will cause the bzrlib
243       test reporter to be used, which has a textual progress bar. This requires
244       a recent bzrlib as a minor bugfix was required in bzrlib to support this.
245
246     * ``subunit2junitxml`` has been added. This filter converts a subunit
247       stream to a single JUnit style XML stream using the pyjunitxml
248       python library.
249
250     * The shell functions support skipping via ``subunit_skip_test`` now.
251
252   BUG FIXES:
253
254     * ``xfail`` outcomes are now passed to python TestResult's via
255       addExpectedFailure if it is present on the TestResult. Python 2.6 and
256       earlier which do not have this function will have ``xfail`` outcomes
257       passed through as success outcomes as earlier versions of subunit did.
258
259   API CHANGES:
260
261     * tags are no longer passed around in python via the ``TestCase.tags``
262       attribute. Instead ``TestResult.tags(new_tags, gone_tags)`` is called,
263       and like in the protocol, if called while a test is active only applies
264       to that test. (Robert Collins)
265
266     * ``TestResultFilter`` takes a new optional constructor parameter 
267       ``filter_predicate``.  (Martin Pool)
268
269     * When a progress: directive is encountered in a subunit stream, the
270       python bindings now call the ``progress(offset, whence)`` method on
271       ``TestResult``.
272
273     * When a time: directive is encountered in a subunit stream, the python
274       bindings now call the ``time(seconds)`` method on ``TestResult``.
275
276   INTERNALS:
277
278     * (python) Added ``subunit.test_results.AutoTimingTestResultDecorator``. Most
279       users of subunit will want to wrap their ``TestProtocolClient`` objects
280       in this decorator to get test timing data for performance analysis.
281
282     * (python) ExecTestCase supports passing arguments to test scripts.
283
284     * (python) New helper ``subunit.test_results.HookedTestResultDecorator``
285       which can be used to call some code on every event, without having to
286       implement all the event methods.
287
288     * (python) ``TestProtocolClient.time(a_datetime)`` has been added which
289       causes a timestamp to be output to the stream.