This article is one of the Oracle Application Test Suite (OATS)[1] series published on Xml and More, which includes the following:
In this article, we will show:
Application Testing Suite (OATS) is comprised of several tightly integrated products.[1] The script designer —OpenScript—only runs on Windows, but all the runtime components are available for both Linux and Windows. OpenScript is a scripting platform for creating automated test scripts in Java.
Scripting platform is based upon the Eclipse open source development environment. Initial OpenScript product provides access to a limited set of the Eclipse development environment.
The workbench is the base layer of software and code that provide the foundation on which the OpenScript Modules and Application Programming Interfaces (APIs) operate. Each Workbench window contains one or more perspectives. OpenScript Workbench provides the following perspectives:
Like every recording task, you need to rehearse and make sure all glitches are resolved before the final recording. If you have decided the click path, prepare a cheat sheet like below:
[1] Bring_up_FUSE_URL
[2] Login_SALESREPUSER00001_Welcome1
[3] Click_the_Opportunities_Card
[4] Select_Quarter_2_2013
[5] Drilldown_on_Pinnacle_Server
[6] Click_on_Sales_Account_Picker
[7] Search_for_CUSTOMER_101328336
[8] Click_Cancel
[9] Click_Add_Revenue_Item
[10] Select_Type_Item
[11] Click_Product_LOV_and_Search
[12] Search_for_Elite_Pro_DG_452
[13] Select_Product_and_click_Ok
[14] Click_Cancel
[15] Logout
The numbering of step is for human readers and can help the recording. Each row on the list corresponds to a click in your click path and will become the title of step group in OpenScript recording.
Before recording, there are some preferences you want to set. To set them, you click on View and then OpenScript Preferences. For example, we would like to control the grouping, naming and numbering of step groups by ourselves (see "Cheat Sheet"). So, set your "ADF Load" preferences as below:
- Auto-Correlating Session IDs in Oracle Application Test Suite (OATS)
- Removing "Compatibility setting is not supported" Warning before You Do OpenScript Recording
- How to Configure Scripts to use Databanks in OATS
- ORA-01691: unable to extend lob segment
- How to Restart OATS Services
In this article, we will show:
- How to create load testing scripts using OpenScript[2]
Introduction to OpenScript
Application Testing Suite (OATS) is comprised of several tightly integrated products.[1] The script designer —OpenScript—only runs on Windows, but all the runtime components are available for both Linux and Windows. OpenScript is a scripting platform for creating automated test scripts in Java.
You can use OpenScript to create scripts for different testings. For example, OATS supports
- Functional Testing
- Load Testing
In this article, we will show you how to create load testing scripts in OpenScript.
The Platform
Scripting platform is based upon the Eclipse open source development environment. Initial OpenScript product provides access to a limited set of the Eclipse development environment.
The workbench is the base layer of software and code that provide the foundation on which the OpenScript Modules and Application Programming Interfaces (APIs) operate. Each Workbench window contains one or more perspectives. OpenScript Workbench provides the following perspectives:
- Tester perspective
- Developer perspective
- Reset perspective
- Scripts (lowest)
- Folders
- Repositories (highest)
Version: 12.3.0.1 Build 376
Cheat Sheet
Like every recording task, you need to rehearse and make sure all glitches are resolved before the final recording. If you have decided the click path, prepare a cheat sheet like below:
[1] Bring_up_FUSE_URL
[2] Login_SALESREPUSER00001_Welcome1
[3] Click_the_Opportunities_Card
[4] Select_Quarter_2_2013
[5] Drilldown_on_Pinnacle_Server
[6] Click_on_Sales_Account_Picker
[7] Search_for_CUSTOMER_101328336
[8] Click_Cancel
[9] Click_Add_Revenue_Item
[10] Select_Type_Item
[11] Click_Product_LOV_and_Search
[12] Search_for_Elite_Pro_DG_452
[13] Select_Product_and_click_Ok
[14] Click_Cancel
[15] Logout
The numbering of step is for human readers and can help the recording. Each row on the list corresponds to a click in your click path and will become the title of step group in OpenScript recording.
OpenScript Preferences
Before recording, there are some preferences you want to set. To set them, you click on View and then OpenScript Preferences. For example, we would like to control the grouping, naming and numbering of step groups by ourselves (see "Cheat Sheet"). So, set your "ADF Load" preferences as below:
Creating a New Project
In this demonstration, we will create an open script for load testing (File > New...). Our web application is CRM FUSE. So, we have selected "Oracle Fusion/ADF" wizard from the New Project (see above).
- Oracle Fusion/ADF
- This option lets you create a new script for load testing of Oracle Application Development Framework (ADF)-based applications and other applications that utilize HTTP and ADF protocols at the protocol level.
At the next step, you are asked to provide a Script Name. So, we set them as follows:
Creating the first step group is a bit different from the rest. So, we describe it separately. Note that we have NOT clicked on the record button yet.
Before we click on the record button (i.e., red circle), create the first message group as shown below:
Open your notepad and copy the first row into the title field as shown below. Then click OK.
Finally, don't forget to stop the recorder.
If your runtime environment is Linux, you need to export script created in OpenScript as follows:
For example, a new zip file was created in our default repository:
- Create script as a Function Library (unchecked)
- Script Name: FUSE_Saleopty_oct07_wrk
Finally click Finish to create a new script. The resulting script will contain the Initialize, Run, and Finish nodes. The Run node will contain recorded HTTP protocol navigations based upon the defined Step Group preferences and the navigations and ADF protocol for actions performed during recording. You can edit the script tree or Java code to customize the script.[4]
In the following sections, we will demonstrate how to create:
In the following sections, we will demonstrate how to create:
- First step group
- Remaining step groups
Creating First Step Group
Before we click on the record button (i.e., red circle), create the first message group as shown below:
Open your notepad and copy the first row into the title field as shown below. Then click OK.
Note that we have chosen "No delay" for the first step. But, for other steps, we will specify "Delay 44 secs."
Now click the record button. Your chosen browser (for our demonstration, it's Firefox) will be brought up. Copy your URL:
Next repeat the following subtasks for the remaining groups until it finishes:
Start Recording
Now click the record button. Your chosen browser (for our demonstration, it's Firefox) will be brought up. Copy your URL:
http://www.mycompany.com:9006/customer/faces/CrmFusionHomeinto the address field and hit Enter. This finishes the recording of the first step group.
Next repeat the following subtasks for the remaining groups until it finishes:
- Creating a new step group in OpenScript
- Right select previous Step Group to bring up context menu and select New > Step Group
- Copying the next row of click path from Notepad
- Clicking next step in your Browser
Finally, don't forget to stop the recorder.
Exporting Script
If your runtime environment is Linux, you need to export script created in OpenScript as follows:
File > Export Script...
D:\OracleATS\OFT\FUSE_Saleopty_oct07_wrk.zipYou can then copy it to your Linux box:
scp FUSE_Saleopty_Server1_wrk.zip aime1@mylinuxserver:/scratch/aime1/work
References
- Oracle Application Testing Suite
- OpenScript for Load Testing Script Troubleshooting (Tutorial)
- Version: 12.3.0.1 Build 376 was used in this article.
- This version requires Firefox 10.0 ESR (Windows download).
- Oracle Application Testing Suite Downloads
- Oracle Application Testing Suite 12.x: Oracle Load Testing Overview
- OATS: Tie All Processes Together — from OpenScript to Scenario (Xml and More)
137 comments:
Post a Comment