Creating and editing Rational Performance Tester scripts with Test Perspective
You can create Rational Performance Tester scripts of the following types with Test Perspective. Before creating a Rational Performance Tester script, you must install Rational Performance Tester Workbench.
- BSD Oracle ERP scripts. See the Software Prerequisites
in the Information Center for information about versions of the BSD
Oracle plugin that are supported for supported versions of Rational
Performance Tester.Note: Older versions of the plugin are supported, but the breakdown availability of the response time data is available only for the Client portion.
- Citrix scripts
- HTTP/HTTPS scripts
- SAP GUI scripts
- SAP Web Interface scripts
- Siebel scripts
- Socket extensions, including TN3270 connections
- Web Services/SOA scripts
- From the Rational Performance
Tester, create a new test from the recording:
- Select .
- Select the type of recording and click Next.Remember: This procedure of recording new scripts varies, depending on what type of the script you are creating. You can find out more information about recording a script in the Rational Performance Tester help.
- To record HTTP/HTTPS scripts for Response Time, always select RPT HTTP Recording.
- To record Web Services/SOA scripts, if you select Web service Recording using Generic Service Client option, you can import an existing WSDL file and add the endpoint information; if you select Web service or XML Recording using Existing Client (HTTP Proxy), web service calls and network traffic is routed through a HTTP proxy on the recorder of Rational Performance Tester and is used with existing web services client applications.
- To playback a Rational Performance Tester script when
a proxy server is needed to reach the target web application, ensure
that both of the following proxy configuration conditions are met:
- The Robotic Response Time agent is configured with the proxy server definition.
- The Rational Performance Tester script source includes the appropriate proxy data settings.
Record your script using the Rational Performance Tester Workbench and specify the proxy settings in the recording.
If the proxy information or authentication needed during script playback differs from the settings saved in the Rational Performance Tester script, then you must also define these playback proxy settings in the Robotic Response time agent configuration. These settings will be used after the Robotic Response Time agent determines that the proxy agent cannot be reached, or if the configured user name and password do not successfully authenticate to the proxy server.
Limitation: The playback will use the agent configured proxy details or the realm authentication credentials when the playback of the script fails. However, this is only done once, so either the proxy details or the authentication credentials are used, but not both at the same time.
- To record Oracle ERP Rational Performance Tester scripts,
select Oracle Recorder. The Oracle
Recorder option is displayed after the BSD Oracle plug-in
is installed and configured correctly. BSD Oracle plug-in is supported,
as an extension to Rational Performance Tester. To install the BSD
Oracle plug-in, after Rational Performance Tester is installed, perform
the following steps:
- Extract the .zip file of the BSD Oracle plug-in to the following
directories, where RPT_install_dir is installation
directory of Rational Performance Tester (The default is C:\Program
Files\IBM\SDP).
- RPT_install_dir\rptse\dropins\eclipse
- RPT_install_dir\dropins\eclipse
- Install the license file for the BSD Oracle plug-in. A license server is required for enabling the license. For detailed information about how to enable the license, see BSD documentation.
- Start Rational Performance Tester with the -clean option so that the plug-ins are reloaded.
- Click . The Preferences window is displayed.
- In the left pane, expand Test and select Oracle Applications Extension.
- In the Oracle Applications Extension pane, specify the license file path in the BSD Group license path field.
- Click Apply, and then click OK.
- Extract the .zip file of the BSD Oracle plug-in to the following
directories, where RPT_install_dir is installation
directory of Rational Performance Tester (The default is C:\Program
Files\IBM\SDP).
- Select a project.
- Type the filename for the test you want to create and click Finish.Note: Be sure to use only ASCII characters in the name, otherwise you might encounter problems later when you playback the script.
- Use Performance Test Generator to access a test site and record transactions. For more information, see the Rational Performance Tester product online help.
- (Optional) Create a datapool.
A datapool provides variable data during test runs. Rational Performance Tester scripts use data from when the test was recorded. By associating a datapool with a test at runtime, you can substitute the variable data in the datapool for the data in the test.
- Select .
- Specify a name and location for the datapool file.
- Specify the number of variables (columns) that you want and click Next.
- Specify the number of records (rows) that you want and click Next.
- Specify the name, type of action, and the location of the datapool variable and click OK.
- Associate the datapool with a test.
- Click Add datapool in the common options tab of a test.
- Select the datapool you want to use.
- Associate a request in the test with a Datapool column
- Select a request in the test. The candidates for datapool appear in green in Test Element Details.
- Right-click the candidate and click .
- Select the Datapool column and click Use Column.
- (Optional) Encrypt a datapool column.
- Click on the column header for a variable and the Edit Variable window opens.
- Select the Encrypt check box.
- Click OK and the Set Password window opens.
- Type password you want to use for the variable and click OK.
The datapool variable is now encrypted.
- (Optional) Create verification points Note: You must enable the corresponding verification points in the Rational Performance Tester test before you upload the test script with Multi File UploaderVerification Points are a way to do the following things:
- Detect problems in an application, such as: Does the web page contain the expected information? Is this the expected window?
- Enforce an Service Level Agreement so that you can verify that each page in the transaction sequence to multiple pages is correct
- Content Verification Point searches for a specific string on a page.
- Page Title Verification Point compares the page title against the recorded title.
- Response Code Verification Point compares the HTTP code returned against the recorded code.
- Response Size Verification Point compares the page size returned against the recorded size.
- Custom if custom code is added to a test, returns a pass status when the custom class returns a pass status after performing a verification written in Java code.
Tip: For HTTP scripts, Rational Performance Tester automatically sends a URL unavailable message if the site is down, even if you did not enable verification points for the script. Response Time looks for these messages and sends an event to the Tivoli Enterprise Monitoring Server. For Web Services scripts, Rational Performance Tester does not automatically send any Unavailability or error message when the site is down, so you must enable verification points for web service scripts if you want to receive availability violations.- Open the test for which you want to create custom code.
- Right-click a test element and do one of the following:
- To append custom code to the bottom of the test element, click .
- To append custom code above the selected test element, click .
- In Test Element Details, specify a new or an existing class name.
- Click Generate Code to create skeleton code.
- Edit the existing or skeleton code and click Add.
- (Optional) Further customize the script with Custom Code.
Custom code extends Rational Performance Tester tests by:
- Adding custom logging
- Providing runtime data values to the test.
- Adding custom verification points
- Running external programs
- Additional Information
- Use ICustomCode2 and ITestExecutionServices interfaces
to create custom code and extend test execution.
Interfaces for creating custom code are in the com.ibm.rational.test.lt.kernel.services package.
Add any external jars referenced by the Custom code to the Java™ build path of the project.
- Example of Custom Code
- Text preceded by * indicates an explanation.
- Example of how to log messages to the execution history of the test
- (Optional ARM Enablement for HTTP scripts
only) By default only the main pages of the script are ARM enabled
when exported. Page elements (such as .gifs or .javascript)
are not ARM enabled. You can change this by setting the ARM instrumentation
level from within the script:
- Switch to the Performance Test perspective.
- Edit the script.
- Select the root of the test.
- Click Enable Response Time Breakdown to ARM-enable all pages and page elements such as .gifs or .javascript.
- Export the script using the ITCAM export wizard.
- Export the script to the Application Management Console.
- If you have not already done so, use the Application Management Configuration Editor to define the applications and transactions you want to monitor with this robotic script. (Using the Application Management Configuration Editor)