Message-ID: <624020748.3883.1369406274605.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3882_629575531.1369406274605" ------=_Part_3882_629575531.1369406274605 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Some people like their unit tests to fai= l on failure
OnlineTestCase support for failure on failed= connection
This page represents the current plan; for discussion p= lease check the tracker link above.
OnlineTestCase provides infrastructure for configuring online test case = fixtures. The current behaviour disables the test if an exception is thrown= in the connect() method. It is proposed that an optional key be added to t= he test fixture property file to change this behaviour to failing if connec= t() fails.
From the javadoc (proposed code):
The default behaviour of this class is that if
rows an exception, the test
suite is disabled, causing each test to pass without being run. In addition= , exceptions thrown by
disconnect() are ignored. This behaviour allows tests to be ro=
bust against transient
outages of online resources, but also means that local software failures in=
disconnect() will be silent.
To have exceptions thrown by
() cause tests to fail,
skip.on.failure=3Dfalse in the fixture property file. This=
traditional behaviour of unit tests, that is, that exceptions cause unit te= sts to fail.
Announcement of this proposal, and following discussion:
This proposal has been accepted. The implementation is complete.
The optional key
skip.on.failure may be added to an
nlineTestCase fixture property file. For example:
If this key is absent or set to
true, the original behaviou=
r is retained.
A note will be added to the testing page to record this optional behavio= ur: