1873N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
1873N/A ! The contents of this file are subject to the terms of the 1873N/A ! Common Development and Distribution License, Version 1.0 only 1873N/A ! (the "License"). You may not use this file except in compliance 1873N/A ! You can obtain a copy of the license at 1873N/A ! See the License for the specific language governing permissions 1873N/A ! and limitations under the License. 1873N/A ! When distributing Covered Code, include this CDDL HEADER in each 1873N/A ! file and include the License file at 1873N/A ! add the following below this CDDL HEADER, with the fields enclosed 1873N/A ! by brackets "[]" replaced with your own identifying information: 1873N/A ! Portions Copyright [yyyy] [name of copyright owner] 3215N/A ! Copyright 2007-2008 Sun Microsystems, Inc. 6184N/A ! Portions Copyright 2013 ForgeRock AS 3949N/A <
defaultcall function="main_sample" />
3949N/A <
function name="main_sample">
3816N/A <
function-
required-
arg name="STAXParentID"/>
3949N/A <!--- Load the job environment for the test group execution --> 3949N/A <
import machine="STAF_LOCAL_HOSTNAME" 3949N/A <
call function="'loadJobEnvironment'">
3949N/A { 'parent' : STAXParentID }
3949N/A CurrentTestPath['group']= 'sample'
3949N/A #@TestSuitePurpose Illustrate how to easily contribute functional tests 1873N/A flow of a suite in front of unexpected conditions 3949N/A <!-- this is an example of how to loop through a list of functions to 3949N/A run instead of duplicating calls 3949N/A <
iterate in="['testGroup_Preamble','testSuite_Preamble','sample_setup']" var="setupStep">
3949N/A <!-- the sequence tag is superfluous here since there is only a 3949N/A single instruction to execute within the iterate block 3949N/A <
call function="setupStep" />
3949N/A <
iterate in="['sample_test','knownIssue_test','passing_test','inconclusive_test','failing_test']" var="testStep">
3949N/A <!-- the sequence tag is superfluous here since there is only a 3949N/A single instruction to execute within the iterate block 3949N/A <
call function="testStep" />
3949N/A <!-- it is a good idea to make sure that the messages getting 3949N/A sent to the gui also make their way in the logs for easier 1873N/A after-the-fact log mining. Use log="1" wherever it makes sense 3949N/A Setting the log level to an appropriate value will also make 1873N/A troubleshooting and debugging easier. 1873N/A Level values can be (among others): 3949N/A <
message log="1" level="'fatal'">'Could not create the topology. Bailing out.'</
message>
3949N/A <
message log="1" level="'fatal'">'Could not start at least one server in the topology. Bailing out.'</
message>
3949N/A <
iterate in="['sample_cleanup','testSuite_Postamble','testGroup_Postamble']" var="testStep">
3949N/A <
call function="testStep" />
1873N/A <
function name="sample_test">
1873N/A Place test-specific test information here. 1873N/A The tag, TestMarker, must be the same as the tag, TestSuiteName. 1873N/A #@TestPurpose Illustrate how to issue a query on OpenDS 1873N/A #@TestStep Fetch all the entries in the server 1873N/A #@TestResult Success if OpenDS returns 0 2311N/A <
block name="STAXCurrentFunction">
2055N/A CurrentTestPath['suite']= 'search'
2311N/A <
testcase name="getTestCaseName(STAXCurrentFunction)">
2055N/A <
call function="'testCase_Preamble'" />
2055N/A <
call function="'SearchObject'">
2055N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2055N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2055N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2055N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2055N/A 'dsBaseDN' : DIRECTORY_INSTANCE_SFX ,
2055N/A 'dsFilter' : 'objectclass=*' }
2055N/A <
call function="'testCase_Postamble'" />
2278N/A <
function name="knownIssue_test">
2278N/A Place test-specific test information here. 2278N/A The tag, TestMarker, must be the same as the tag, TestSuiteName. 2278N/A #@TestPurpose Illustrate how to issue a query on OpenDS 2278N/A #@TestStep Fetch all the entries in the server 2278N/A #@TestResult Success if OpenDS returns 0 2311N/A <
block name="STAXCurrentFunction">
2278N/A CurrentTestPath['suite']= 'search'
2311N/A <
testcase name="getTestCaseName(STAXCurrentFunction)">
2278N/A <
call function="'testCase_Preamble'" />
2278N/A <!-- search for an entry that does not exist --> 2278N/A <
call function="'SearchObject'">
2278N/A { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
2278N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
2278N/A 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
2278N/A 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
2278N/A 'dsBaseDN' : DIRECTORY_INSTANCE_SFX ,
3951N/A 'dsFilter' : 'wrongfilter' ,
2278N/A <
call function="'testCase_Postamble'" />
2055N/A <!-- the dummy failing test --> 2055N/A <
function name="failing_test">
2055N/A Place test-specific test information here. 2055N/A The tag, TestMarker, must be the same as the tag, TestSuiteName. 2055N/A #@TestPurpose Illustrate how to issue a query on OpenDS 2055N/A #@TestStep Fetch all the entries in the server 2055N/A #@TestResult Success if OpenDS returns 0 2311N/A <
block name="STAXCurrentFunction">
2055N/A CurrentTestPath['suite']= 'dummy'
2311N/A <
testcase name="getTestCaseName(STAXCurrentFunction)">
2055N/A <
call function="'testCase_Preamble'" />
2055N/A <
tcstatus result="'fail'" />
2055N/A <
call function="'testCase_Postamble'" />
2311N/A <!-- the dummy inconclusive test --> 2311N/A <
function name="inconclusive_test">
2311N/A Place test-specific test information here. 2311N/A The tag, TestMarker, must be the same as the tag, TestSuiteName. 2311N/A #@TestPurpose Illustrate how to issue a query on OpenDS 2311N/A #@TestStep Fetch all the entries in the server 2311N/A #@TestResult Success if OpenDS returns 0 2311N/A <
block name="STAXCurrentFunction">
2311N/A CurrentTestPath['suite']= 'dummy'
2311N/A <
testcase name="getTestCaseName(STAXCurrentFunction)">
2311N/A <
call function="'testCase_Preamble'" />
2311N/A <
call function="'testCase_Postamble'" />
2055N/A <!-- the dummy passing test --> 2055N/A <
function name="passing_test">
2055N/A Place test-specific test information here. 2055N/A The tag, TestMarker, must be the same as the tag, TestSuiteName. 2055N/A #@TestPurpose Illustrate how to issue a query on OpenDS 2055N/A #@TestStep Fetch all the entries in the server 2055N/A #@TestResult Success if OpenDS returns 0 2311N/A <
block name="STAXCurrentFunction">
2055N/A CurrentTestPath['suite']= 'dummy'
2311N/A <
testcase name="getTestCaseName(STAXCurrentFunction)">
2055N/A <
call function="'testCase_Preamble'" />
2055N/A <
tcstatus result="'pass'" />
2055N/A <
call function="'testCase_Postamble'" />
1873N/A <!-- Setup the instance for sample test --> 1873N/A <
function name="sample_setup">
1873N/A <
call function="'runFunction'">
1873N/A { 'functionName' : 'createTopology' ,
1873N/A 'functionArguments' : { 'initialiseInstance' : True }
1873N/A <
call function="'runFunction'">
1875N/A { 'functionName' : 'StartDsWithScript' ,
1873N/A 'functionMessage' : 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) ,
1873N/A 'functionArguments' : { 'location' : STAF_REMOTE_HOSTNAME }
1873N/A <
call function="'runFunction'">
1873N/A { 'functionName' : 'isAlive' ,
1873N/A 'functionMessage' : 'Checking if the server is available' ,
4153N/A 'functionArguments' : { 'noOfLoops' : 10 ,
1873N/A 'noOfMilliSeconds' : 2000 }
1873N/A <!-- cleanup after the test --> 1873N/A <
function name="sample_cleanup">
1873N/A <
call function="'runFunction'">
1873N/A { 'functionName' : 'StopDsWithScript' ,
1873N/A 'functionMessage' : 'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT),
3853N/A 'functionArguments' : { 'location' : STAF_REMOTE_HOSTNAME ,
3853N/A 'dsHost' : DIRECTORY_INSTANCE_HOST ,
3853N/A 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
3853N/A 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
3853N/A 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
1873N/A <
call function="'runFunction'">
1873N/A { 'functionName' : 'removeTopology',
1873N/A 'functionMessage' : 'Remove DS topology created for the Test Suite'