From 8428337973eb07afdd22dce925fafc7051e07a93 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 9 Mar 2016 16:45:59 +0100 Subject: Document new CT Hook functions --- lib/common_test/doc/src/ct_hooks.xml | 59 +++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'lib/common_test/doc/src/ct_hooks.xml') diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml index 9c959945d2..12ec3bcec3 100644 --- a/lib/common_test/doc/src/ct_hooks.xml +++ b/lib/common_test/doc/src/ct_hooks.xml @@ -292,6 +292,63 @@ + + Module:post_init_per_testcase(TestcaseName, Config, Return, CTHState) -> Result + Called after init_per_testcase. + + TestcaseName = atom() + Config = [{Key,Value}] + Return = NewReturn = Config | SkipOrFail | term() + SkipOrFail = {fail,Reason} | {skip, Reason} + CTHState = NewCTHState = term() + Result = {NewReturn, NewCTHState} + Key = atom() + Value = term() + Reason = term() + + +

OPTIONAL

+ +

This function is called after + init_per_testcase + if it exists. It behaves the same way as + post_init_per_suite, + but for function + init_per_testcase + instead.

+
+
+ + + Module:pre_end_per_testcase(TestcaseName, InitData, CTHState) -> Result + Called before end_per_testcase. + + TestcaseName = atom() + InitData = Config + Config = NewConfig = [{Key,Value}] + CTHState = NewCTHState = term() + Result = {NewConfig, NewCTHState} + Key = atom() + Value = term() + Reason = term() + + +

OPTIONAL

+ +

This function is called before + end_per_testcase + if it exists. It behaves the same way as + pre_end_per_suite, + but for function + end_per_testcase + instead.

+ +

This function can not change the result of the test case by returning skip or fail + tuples, but it may insert items in Config that can be read in + end_per_testcase/2 or in post_end_per_testcase/4.

+
+
+ Module:post_end_per_testcase(TestcaseName, Config, Return, CTHState) -> Result Called after end_per_testcase. @@ -312,7 +369,7 @@

This function is called after end_per_testcase if it exists. It behaves the same way as - post_init_per_suite, + post_end_per_suite, but for function end_per_testcase instead.

-- cgit v1.2.3