| Last Updated: | August 16, 2003 |
| Status: | Production |
| Version: | 3.0.9.8.2 & later |
This is a quick start guide designed to help you get up and running with the Portal Studio Test Harness in as little time as possible. The Test Harness can be used to both performance test and unit test your web provider without the need for an OracleAS Portal instance. The Test Harness achieves this by sending HTTP requests to a given target and recording the responses obtained from that target, along with the time it took to receive that response. These responses are logged to a file in an XML format for analysis. A performance statistics file is also produced, and a number of other optional output files are available. The Test Harness reads the definition of a test from a Test Definition file. The Test Definition, which follows an XML format, lists Request Instances to be sent to a target web provider in order to test that provider. A Test Definition may or may not reference a Request Library file to obtain request details. This is another XML file that contains a number of requests that various Test Definition files may access to enable requests to be re-used. For more information about the configuration concepts used by the Test Harness, please see the Terms and Definitions section.
The Test Harness includes a number of sample Test Definitions and Request Libraries whose requests access portlets from the PDK Java sample provider.
You have set up and installed the PDK Java sample provider.
Terms and Definitions
Sample Configuration Files
Running Tests
A Note for UNIX Users
This document introduces a number of terms specific to the test harness. The most important terms are defined below. To see working examples of the terms defined, please see the example test definitions and request libraries supplied with the test harness.
A number of test definition files are provided to demonstrate the features of the Test Harness and give you a starting point for creating your own test definitions. The test definitions include:
All example Test Definitions are contained in the pdktest\examples directory.
Each of the Test Definition files listed above make use of a Request Library file. Two such files have been provided, one for 309 Portal requests and one for 902 portal requests. The Test Definitions are set up to use the 902 Request Library. They are contained in the pdkTest\rlib directory.
Note: if you create your own request libraries, placing them in this directory will mean that they are automatically available to the Test Harness.
To set up your environment to run the Test Harness, unzip the pdktest.zip file to a convenient location. This will place a directory called pdktest on your machine that contains all of the Test Harness files. Set an environment variable called PDKTEST_HOME to point to this location. For example, if you extracted to D:\ you would now have a directory called D:\pdktest, which is the value that PDKTEST_HOME should be set to.
The Test Harness provides executable scripts in the bin directory, so to ensure they can be run from anywhere on your file system, append PDKTEST_HOME\bin to your PATH environment variable.
In the Test Definition files you need to set the defaultHost, defaultPort and defaultPath elements to match the location of your sample web provider. The Test harness comes with two sample Request Libraries, and the sample Test Definitions are set to use the ptl902.xml library.
To decide which Request Library to use you need to consider two things - the version of PDK Java used by the web provider and the versions of OracleAS Portal instances that regularly access it. If the version of the PDK Java used is 3.0.9.x or lower then you should use the sample 309 library (ptl309.xml) . If it's version 9.0.2.x or higher you should use the sample 902 library (ptl902.xml), unless the provider is regularly accessed by a portal version 3.0.9.8.x, in which case you should use the sample 309 library.
If you do need to change your Test Definition file to use the sample 309 library, simply replace references to 'ptl902' in the Test Definition to 'ptl309'.
To run the Test Harness issue the following command:
When running the test harness you can specify the following options (you can see these options by running the test harness with no arguments)
-n testname A unique name for this
test run. Defaults to a date-time string. |
Running all tests in the sanity Test Definition, using the test name 'myTest' and accepting all defaults
Running the register and show groups in the sanity Test Definition, using the test name 'myTest' and switching off performance statistics generation.
Running all groups in the sanity test definition, and generating a csv file and no performance statistics file:
Running the register group in the HMAC test definition, with minimum response output and using defaults on everything else:
Running the register, load_20 and deregister groups in the loadTest test definition, specifying verbose output and the minimum response log level and generating a ctl script.
If the Test Harness is to be run on a UNIX based platform, you will need to grant execute permissions to the shell script runTest which can be found in $PDKTEST_HOME/bin before you try to run the Test Harness. For example, if you are already in the $PDKTEST_HOME directory, issue the following command:
| Revision History: |
|
| Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA http://www.oracle.com/ |
Worldwide Inquiries: 1-800-ORACLE1 Fax 650.506.7200 |
Copyright and Corporate Info |