From c0ef28d5eecffc56b72a281a6d73f5ad1504bf0a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 29 Aug 2012 15:12:51 +0200 Subject: Document that CTHs can get fail/skip as Config OTP-10077 --- lib/common_test/doc/src/ct_hooks_chapter.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/common_test/doc/src/ct_hooks_chapter.xml') diff --git a/lib/common_test/doc/src/ct_hooks_chapter.xml b/lib/common_test/doc/src/ct_hooks_chapter.xml index c938851e0e..86237f5fc1 100644 --- a/lib/common_test/doc/src/ct_hooks_chapter.xml +++ b/lib/common_test/doc/src/ct_hooks_chapter.xml @@ -252,6 +252,13 @@ {ok, Handle} -> {[{db_handle, Handle} | Config], CTHState#state{ handle = Handle }} end. + If using multiple CTHs, the first part of the return tuple will be + used as input for the next CTH. So in the case above the next CTH might + get {fail,Reason} as the second parameter. If you have many CTHs + which interact, it might be a good idea to not let each CTH return + fail or skip. Instead return that an action should be taken + through the Config list and implement a CTH which at the end takes + the correct action. -- cgit v1.2.3