From 8950e9ad87b04d5195a0fe2f75c4fce43fd5d504 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Thu, 08 Feb 2007 15:17:22 +0000
Subject: [PATCH] quality task issue 1140 Design some test preamble and postambles

---
 opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml |  154 +++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 123 insertions(+), 31 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
index d793441..c2041f8 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
@@ -27,7 +27,7 @@
  ! -->
 <stax>
 
-    <function name="checkRC">
+  <function name="checkRC">
 
     <function-prolog>
         This function checks a return code against an expected return code
@@ -224,13 +224,13 @@
  
           <sequence>
           <call function="'SearchObject'">
-              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
-                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
-                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
-                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
-                'dsBaseDN'         : 'cn=config' ,
-		'dsFilter'	   : 'objectclass=*' ,
-                'extraParams'       : '-s "base"' }
+              { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+                'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
+                'dsInstanceDn'   : DIRECTORY_INSTANCE_DN ,
+                'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
+                'dsBaseDN'       : 'cn=config' ,
+                'dsFilter'	     : 'objectclass=*' ,
+                'extraParams'    : '-s "base"' }
           </call>
 
           <script>
@@ -280,10 +280,6 @@
 
   </function>
 
-  <!--- XXX TODO XXX 
-       I am not sure this is best way, we could try directly
-       calling python modules os sys
-  -->
   <function name="setOSvariables">
 
     <function-prolog>
@@ -315,40 +311,136 @@
 
   </function>
 
-  <function name="testCaseStartBanner">
-  
+  <function name="testCase_StartBanner">
+
     <function-prolog>
-    Pretty prints a banner at the start of a test.
+      Pretty prints a banner at the start of a test.
     </function-prolog>
-    
-    <function-no-args/>
-    
+
+    <function-no-args />
+
     <sequence>
-    
+
       <message>
         '### Starting test case %s. ###' % STAXCurrentTestcase
       </message>
-      
+
     </sequence>
-      
+
   </function>
-        
-  <function name="testCaseEndBanner">
-        
+
+  <function name="testCase_EndBanner">
+
     <function-prolog>
       Pretty prints a banner at the end of a test.
     </function-prolog>
-        
-    <function-no-args/>
-      
-      <sequence>
-      
+
+    <function-no-args />
+
+    <sequence>
+
       <message>
         '### Ending test case %s. ###' % STAXCurrentTestcase
       </message>
-    
+
     </sequence>
-  
+
+  </function>
+
+  <function name="testCase_Preamble">
+
+    <function-prolog>
+      Performs all the preoperations for a test case
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <call function="'testCase_StartBanner'" />
+
+    </sequence>
+
+  </function>
+
+  <function name="testCase_Postamble">
+
+    <function-prolog>
+      Performs all the post operations for a test suite
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <call function="'testCase_EndBanner'" />
+
+    </sequence>
+
+  </function>
+
+  <function name="testSuite_Preamble">
+
+    <function-prolog>
+      Performs all the pre operations for a test suite
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <message>'Enter test suite preamble'</message>
+
+    </sequence>
+
+  </function>
+
+  <function name="testSuite_Postamble">
+
+    <function-prolog>
+      Performs all the post operations for a test suite
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <message>'Enter test suite postamble'</message>
+
+    </sequence>
+
+  </function>
+
+  <function name="testGroup_Preamble">
+
+    <function-prolog>
+      Performs all the pre operations for a test group
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <message>'Enter test group postamble'</message>
+
+    </sequence>
+
+  </function>
+
+  <function name="testGroup_Postamble">
+
+    <function-prolog>
+      Performs all the post operations for a test group
+    </function-prolog>
+
+    <function-no-args />
+
+    <sequence>
+
+      <message>'Enter test group postamble'</message>
+
+    </sequence>
+
   </function>
 
 </stax>

--
Gitblit v1.10.0