diff options
author | Peter Andersson <[email protected]> | 2011-04-19 16:54:46 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-04-28 22:45:57 +0200 |
commit | 0634077b636eb0c879e1f71ba78ea1565b6617b2 (patch) | |
tree | 2b110674e6784fae2d52282f182388072c166924 /lib/common_test/doc/src/write_test_chapter.xml | |
parent | 4e506a1997af07de7223a307418457ba36bb520c (diff) | |
download | otp-0634077b636eb0c879e1f71ba78ea1565b6617b2.tar.gz otp-0634077b636eb0c879e1f71ba78ea1565b6617b2.tar.bz2 otp-0634077b636eb0c879e1f71ba78ea1565b6617b2.zip |
Document the new init_per_testcase return value.
Diffstat (limited to 'lib/common_test/doc/src/write_test_chapter.xml')
-rw-r--r-- | lib/common_test/doc/src/write_test_chapter.xml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml index 723492d8f3..3f9fdb7121 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -167,12 +167,16 @@ returning <c>{fail,Reason}</c>, nor will it be able to save data with <c>{save_config,Data}</c>.</p> - <p>If <c>init_per_testcase</c> crashes, the test case itself is skipped + <p>If <c>init_per_testcase</c> crashes, the test case itself gets skipped automatically (so called <em>auto skipped</em>). If <c>init_per_testcase</c> - returns a <c>skip</c> tuple, also then will the test case be skipped (so - called <em>user skipped</em>). In either event, the <c>end_per_testcase</c> is - never called. + returns a tuple <c>{skip,Reason}</c>, also then the test case gets skipped + (so called <em>user skipped</em>). It is also possible, by returning a tuple + <c>{fail,Reason}</c> from <c>init_per_testcase</c>, to mark the test case + as failed without actually executing it. </p> + <note><p>If <c>init_per_testcase</c> crashes, or returns <c>{skip,Reason}</c> + or <c>{fail,Reason}</c>, the <c>end_per_testcase</c> function is not called. + </p></note> <p>If it is determined during execution of <c>end_per_testcase</c> that the status of a successful test case should be changed to failed, |