From 6288b704f2ee0699407f645536ad69e0dd07756d Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 2 Dec 2010 15:27:10 +0100 Subject: Started work on documenting suite callbacks, this is a partial commit --- lib/common_test/doc/src/Makefile | 2 +- lib/common_test/doc/src/ct_suite_callbacks.xml | 94 ++++++++++++++++++++++++++ lib/common_test/doc/src/ref_man.xml | 1 + 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 lib/common_test/doc/src/ct_suite_callbacks.xml diff --git a/lib/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile index 1a767a8197..be066143e0 100644 --- a/lib/common_test/doc/src/Makefile +++ b/lib/common_test/doc/src/Makefile @@ -52,7 +52,7 @@ CT_XML_FILES = $(CT_MODULES:=.xml) XML_APPLICATION_FILES = ref_man.xml XML_REF1_FILES = ct_run.xml -XML_REF3_FILES = $(CT_XML_FILES) +XML_REF3_FILES = $(CT_XML_FILES) ct_suite_callbacks.xml XML_REF6_FILES = common_test_app.xml XML_PART_FILES = part.xml diff --git a/lib/common_test/doc/src/ct_suite_callbacks.xml b/lib/common_test/doc/src/ct_suite_callbacks.xml new file mode 100644 index 0000000000..28a496a47b --- /dev/null +++ b/lib/common_test/doc/src/ct_suite_callbacks.xml @@ -0,0 +1,94 @@ + + + + + +
+ + 20102010 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + Suite Callbacks + Lukas Larsson + Lukas Larsson + + + + 2010-12-02 + PA1 + suite_callback.sgml +
+ ct_suite_callback + A callback interface on top of common test + + + +

The Suite Callback framework allows extensions of the default + behaviour of Common Test by means of callbacks before and after all + test suite calls.

+ +

In brief, Suite Callbacks allows you to:

+ + + Manipulating the runtime config before each suite configuration calls + Manipulating the return of all suite configuration calls + + +

The following sections describe the mandatory and optional suite callback + functions Common Test will call during test execution. For more details + see Suite Callbacks in the User's Guide.

+ +
+ +
+ CALLBACK FUNCTIONS +

The following functions define the callback interface + for a suite callback.

+
+ + + + Module:init(Opts) -> {Id,State} + asdas + + Opts = term() + Id = term() + GroupName = term() + + + +

MANDATORY

+ +

+ +

If {skip,Reason} is returned, all test cases + in the module will be skipped, and the Reason will + be printed on the HTML result page.

+ +

For details on groups, see + Test case + groups in the User's Guide.

+ +
+
+ + +
+ +
+ + diff --git a/lib/common_test/doc/src/ref_man.xml b/lib/common_test/doc/src/ref_man.xml index d5985bb021..100c0fe5d7 100644 --- a/lib/common_test/doc/src/ref_man.xml +++ b/lib/common_test/doc/src/ref_man.xml @@ -76,6 +76,7 @@ + -- cgit v1.2.3