Naming convention

Name of test specification: "TS_nbversion_testspecname" (e.g. TS_60_ActionsWizard)

How to generate JSPWiki Test Specification

Current state

  • There are various versions of XSL template, which transforms XML Test Specification into HTML.
  • These XMLs and XSLs can be found in QA CVS module.
  • HTML Test Specifications are produced from XML using some tool or shell script. They both use testspec2html.xsl file.

To transform your XML file(s) into JSPWiki syntax instead of HTML you will need following files:

  1. Xalan-J binary to transform XML using XSL http://download.nextag.com/apache/xml/xalan-j/xalan-j_2_7_0-bin.zip
  2. Test Specification can be in one (e.g. dtd_editor.xlm) or two XML files (e.g. Loaders.xml and repository_Loaders.xml).
    One of these two XSL files:
  1. Shell script, which combines previous two files to achieve requested result - text file, which contains JSPWiki source of Test Specification. This script is platform dependent:

Please follow these steps when you have requested files:

  1. Extract Xalan-J binary to directory of your choice (you'll need path to this directory later).
  2. Choose one of XSL files mentioned above (testspec2jspwiki_1_TestSpecificationsInfo.xsl or testspec2jspwiki_2_TestSpecificationsInfo.xsl), rename it to testspec2jspwiki.xsl and put it in some directory together with chosen script (e.g. spec2jspwiki_TestSpecificationsInfo.sh).
  3. Edit script in your favorite editor. Be sure to set this values in the file:
  • Path to your Java JRE.
  • Xalan dir (path into your Xalan directory)
  1. Put your Test Specification's XML file(s) into directory, where XSL file and shell script are.
  2. Run the script from the command line. It's usage is described below.

Usage of the script

It is not important whether your Test Specification consist of one or two XML files. Usage is the same.

  • Windows:
  • spec2html.bat your-testspec
  • example: spec2html.bat Loaders (in this case, Test Specification is stored in files Loaders.xml and repository_Loaders.xml)
  • Unix:
  • spec2html.sh your-testspec
  • example: spec2html.sh Loaders (in this case, Test Specification is stored in files Loaders.xml and repository_Loaders.xml)

Finally put the result into JSPWiki

  • The script will generate your-testspec-testspec-jspwiki.txt file (e.g. Loaders-testspec-jspwiki.txt).
  • Copy & paste it's content (except the first line) into newly created JSPWiki page (using Naming convention mentioned on top of this page).

Known problems

  • Test Specification is generated, but test cases are missing. - If you have Test Specification in two files, then try to rename them like this: YourTestSpec.xml and repository_YourTestSpec.xml (YourTestSpec_repository.xml is wrong).
  • TODO:
    1. In source file:
      [[Foo | foo]]
      should be substituted by {[[foo]} in output file - to display it correctly in wiki.
    2. Adds spaces to output - output from
      is {Foo ,}
    3. 1st line of output needs to be removed manually:
      <?xml version="1.0" encoding="UTF-8"?>
    4. Ignores
      in test cases. Works only in test suites.

If you encounter any problems, please report them to petr.chytil@sun.com

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo