README revision f71f7a61dec7c9089378d14493ad564a1dedf0b5
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * CDDL HEADER START
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * The contents of this file are subject to the terms of the
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * Common Development and Distribution License, Version 1.0 only
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * (the "License"). You may not use this file except in compliance
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * with the License.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * You can obtain a copy of the license at
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * trunk/opends/resource/legal-notices/OpenDS.LICENSE
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * See the License for the specific language governing permissions
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * and limitations under the License.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * When distributing Covered Code, include this CDDL HEADER in each
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * file and include the License file at
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * add the following below this CDDL HEADER, with the fields enclosed
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * by brackets "[]" replaced with your own identifying information:
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * Portions Copyright [yyyy] [name of copyright owner]
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * CDDL HEADER END
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync * Portions Copyright 2007 Sun Microsystems, Inc.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe purpose of the parsing tool is to parse comments from the functional test xml files.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe comments must have preset tags in order for the them to be properly captured by the
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncparsing tool. This README files will describe what is needed in the comments of
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncthe functional test xml files, and how to build and run the parsing tool.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncEach directory will be assumed to contain the tests within a test group.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncEach test group needs to have the following tags.......
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync#@TestSubgroupName [only necessary for some test groups, like Security]
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncIt is not critical in which xml file or where in the xml file these tags are located,
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncas long as the xml file is in the proper directory for the test group. For convenience,
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncthe tags for the test group should be near the top of the xml file which is used
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe following is an example for the test group, functional-tests/testcases/security/pwd_storage,
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncand is located in file, security_setup_pwd_storage.xml
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestGroupPurpose To test the security functionality.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncSome test groups will not have the tag, #@TestSubgroupName.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncFor instance, the test group tags for the Backend group are
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestGroupPurpose To test the backend functionality.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncEach xml file will be treated as a test suite. Each file should contain the following tags......
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe tags should be located near the top of each file. The exact location is not critical.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe following example is from the test suite, MD5 Tests, which is located in
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncfunctional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncEach functional test xml file will have multiple test cases.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncEach test case should have the following tags........
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe tags should be located near the beginning of each test case.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe #@TestMarker should match the value of #@TestSuiteName. The parsing tool needs this
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsynccorrelation to match each test case with the proper test suite.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThe #@TestIssue should be the number in IssueTracker that corresponds to the feature or defect
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncwhich this test case is testing. Do not add the hyperlink to the issue web page.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncAs many #@TestStep tags may used to define the steps that are involved in each test case.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThere should be one #@TestStep tag for each step. There is no limit to the number of test
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncsteps which may be defined. Each test step may have multiple lines.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncfunctional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync The tag, TestMarker, must be the same as the tag, TestSuiteName.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestPurpose Change password storage scheme to MD5.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncfunctional-tests/testcases/security/pwd_storage/security_pwd_MD5.xml
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync The tag, TestMarker, must be the same as the tag, TestSuiteName.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestStep Admin changes a user's password to convert
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync so it is stored as MD5 scheme.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestStep The user binds with the new password.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsync #@TestResult Success if OpenDS returns 0 for the ldap
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncNo other packages are necessary for building the java files other than those
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncthat come with the jvm. Java version 1.5.0 was used to build the java files.
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncCommand line build while in the directory containing the java files.....
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncThree parameters are required to run the parsing tool from the command line, directory-to-testcase-files,
a206862a46bd0211b89cdd8bb347517c93e1e683vboxsyncjava -cp [path-to-class-files] GenerateOpenDSTestSpecs [directory-to-testcase-files] [directory-for-output-files] [file format]