SlideShare a Scribd company logo
1 of 25
Download to read offline
1
Oracle Application Testing Suite
OpenScript for Load Testing
Script Troubleshooting Hands-on Lab Exercise
Contents
Setting up Lab Environment .....................................................................................................................2
Script Debugging Review...........................................................................................................................3
Additional Script Debugging Method .....................................................................................................18
Introduction
This document reviews the script debugging method that is used in the video training, “OpenScript Load
Testing Troubleshooting Training” session. Click here to access the training in Oracle Learning Library.
The exercise enables you to familiarize with the common debugging methods in OpenScript Load testing
module. When you execute a load testing script that is recorded against your application, playback may
fail with script error. This exercise document walks you through to understand how to analyze the error
messages, compare the content and header information between recording and playback, identify the
root cause of the playback problem, and apply custom correlation to resolve the problem.
2
Setting up Lab Environment
The HOL exercise comes with three sample scripts.
ď‚· MedRec_Training12.1_NoFix.zip: Script has no fix applied. When executed, it fails at step3.
ď‚· MedRec_Training12.1_PartialFix.zip: Script has a partial fix (same fix done in the Video training).
Passes all steps, but has hidden problems in the content returned.
ď‚· MedRec_Training12.1_Fixed.zip: Script has the complete fix. When executed, it passes all steps
with correct content loaded.
Please use script “MedRec_Training12.1_NoFix” for this exercise.
How to Import the script to your OpenScript:
OpenScript menu File -> Import and select the MedRec_Training12.1_NoFix.zip file from your local file
systems.
The sample script runs against the Medical Record application that comes with your ATS installation.
Please enable the sample application before running the scripts. The script requires OpenScript version
12.1 or higher.
How to enable the Sample Application:
Windows Start Menu -> ALL programs -> Oracle Application Testing Suites -> Samples ->Start Medrec
Application. This will start the Medrec application.
For more details on how to enable the sample application, please see “OATSGettingStaredGuide”,
Chapter 3.1 Starting the Avitek Medical Records Sample Application”.
Note: The script runs against your localhost. In some cases, it may not playback if a proxy is set in your
OpenScript configuration. When you see this problem, please try removing the proxy settings from View
-> OpenScript Preference -> Playback -> HTTP-> Proxy Settings.
3
Script Debugging Review
Once the script MedRec_Training12.1_NoFix.zip is imported to your OpenScript 12.x, and MedRec
application in your local system is enabled, click the playback button on the toolbar to execute the script.
The script playback will execute the navigations and eventually fail with the error message “HTTP
response code 500 Internal Server Error”. This is the problem you will resolve in this exercise.
Select the Failed node in the Result view (bottom pane), and go to the Details view (upper right hand
pane). Click the Comparison tab. This feature allows you to compare content, headers, cookies or
resources information between recorded and playback, to help you identify the root cause of the
navigation failure. Select Request Headers from the pull-down menu.
4
Scroll down to where you can see the Postdata parameters. Session IDs have the same values for
recorded and playback. If the application expects different values for each playback for these session IDs,
then the navigation may fail, as the values used in the script are no longer valid during playback.
How to fix this problem? We will need to correlate the dynamic parameters so that they will use
different values each time during playback, instead of the recorded data.
Once again select the failed node in the Result view, and right mouse click to select “Find Failure in
Tree”. This will highlight the corresponding navigation node in the Script view.
5
Expand the highlighted navigation in the Script view to display the PostData parameters. You will see the
parameter values are hardcoded. The values may need to be correlated, in order to receive a correct
response from the server.
What are the Correlations in Load scripting? Let’s review.
Correlations are required in OpenScript load scripts, when a server in AUT (application under test)
exchanges dynamic session values with the browser. OpenScript tries to auto-correlate the session IDs.
However, in some cases manual correlation is required.
In the sample application, the server applies a dynamic session ID by embedding the value in an input
type hidden field in the contents (step 2). The client then needs to send back the same session id to the
server to notify who is sending the request, in the next navigation (step 3). The problem is that the
session ID in step 3 is hard-coded, and uses the same value every time the script plays back.
6
As the server receives the WRONG value during playback, it cannot identify the sender of the request.
That is why the script has a 500 Internal Server Error from the server.
To fix this problem, we will need to manually correlate the parameter, so that it will pick up the dynamic
value each time the script plays back.
In the script view, select the PostData parameter you want to correlate. In this example, select the
parameter “javax.faces.ViewState”. Then right mouse click to select “Substitute Variable”.
“Substitute Variable” dialog opens. Select “Create New Variable” and click Next.
7
“Search for Value” dialog opens. You can search the contents of the earlier navigations, and specify
where in the source you want to extract the dynamic value that you will apply to a “solve” variable that
will be created later in the steps. You can also specify regular expression to retrieve the value at run-
time during the playback.
Don’t know the regular expression syntax? Don’t worry as OpenScirpt does auto-search and suggests a
default regular expression for you. Here is what OpenScript suggested:
8
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="(.+?)"
I can accept the regular expression suggested, but I think it can be shorter to get the same result. So, I
will modify the regular expression to the following.
id="javax.faces.ViewState" value="(.+?)"
I can either edit the Regular Expression itself, OR to simply re-select the content in the “Data” window,
to auto create a regular expression.
Click Next to go to the next dialog, “Test Regular Expression”.
In the “Test Regular Expression” dialog, you can test out the Regular Expression you created in the
previous step. Click the Test button, to see whether the results come up as a single correct value.
9
If you see multiple values with different results, then you will need to go back to the previous dialog to
redefine the regular expression. This is because it was not robust enough to identify the value uniquely
from the source. Make sure the test shows the satisfied result, and click Next to show “Create Variable”
dialog.
In this example, I will name the variable “MyVar_ViewState”, and click Finish.
10
Now the variable is created and applied to the selected parameter. Please go to the Script view, and see
the navigation in Step 3.
Double click the node to see the parameter details.
Value before the correlation:
5543073521674880127:-1010958916263511605
Value after the correlation:
{{MyVar_ViewState,5543073521674880127:-1010958916263511605}}
Curly brackets indicate that the value is a variable. The variable Name is MyVar_ViewState, and the
value after comma is a recorded value. The next time this script is executed, it will not use the recorded
value for this parameter, but will use the value that is retrieved from the source, using the regular
expression you specified & tested in the earlier steps.
Let’s check where the value in the variable is coming from. Select the parameter node, right mouse click
to select “Find Variable Source”
11
This will highlight the corresponding node in step2, which has a variable declaration that was applied to
the parameter in step3. You will see a new SolveRegularExpression variable, MyVar_ViewState, is
created under the navigation in step2.
Select the HTML tab in the Details view, and re-select the SolveRegularExpression created in step2. The
text highlighted in the HTML content is where the variable is retrieving the value from the source, and
applying to the variable.
Go ahead and playback the script to verify the fix applied. The script will pass Step 3, which is good news,
however it will fail at Step4 with the same error message we saw before. HTTP response code 500,
Internal Server Error.
12
First let’s check the result for Step 3. Select the navigation in Step3 and click the Browser tab in the
Details view. Verify that the correct browser content is loaded.
Then click the Comparison tab. Select Request Headers from the pulldown menu and scroll down to
where it displays the Postdata parameters. Now, javax.faces.ViewState parameter is correlated. So we
at least fixed the problem in step3.
13
Now let’s check what went wrong with Step4. What we need to do is the same practice. Select the
Failed node in the Result view, and check the Comparison tab in the Details view.
Scroll down to see the Postdata parameters. OK, you see what is the problem here. The ViewState
parameter is again hardcoded. We will need to apply the same solution as we did to step3.
14
Select the failed node in the Result view, right mouse click and select “Find Failure in Tree”. This will
highlight the corresponding navigation node in Step 4 of the Script view.
Expand the navigation to display the Postdata parameters. As expected, session IDs are not correlated.
We will need to apply the same solution for ViewState parameter as we did for Step 3. Select the
parameter node, right mouse click to select “Substitute Variable”.
15
“Substitute Variable” dialog opens. You can create a new variable, but at this time we already have
created a variable for ViewState parameter. You can find a custom parameter “MyVar_ViewState”
shows up in the treeview.
I “think” I can use this variable, so I will select the “MyVar_ViewState” node and click Finish to close the
dialog. Confirm the parameter is correlated in the script view.
Playback the script again, and verify now it passes Step 4… however it fails in Step 5 this time.
16
Expand the nodes in Step 5. The ViewState parameter is not correlated. Expand Step 6 to see that it has
the same situation here as well.
Now you have an idea what needs to be done next. We will need to correlate ViewState parameters for
Step 5 and Step 6 too!
17
Select the parameter node in Step 5, right mouse click to select “Substitute Variable” to open the dialog.
Select the custom parameter “MyVar_ViewState” and click Finish. This will correlate the ViewState
parameter in Step 5. Repeat the same steps for Step 6.
Playback the script. Now all steps have passed status. Finally, the script execution was successful.
However, the correlation problem in the script has not been completely fixed yet. Although the playback
result has “Passed” result for all navigations, there are still some hidden problems remaining in the
script. Please see the next section “Additional Script Debugging Method” to work with this problem
and fix your script completely.
18
Additional Script Debugging Method
In fact, the solution applied in previous section, (and in the video training) did not completely resolve
the correlation problem for the sample script yet. Although the script result has “Passed” status for all
navigations, some hidden problems still need to be manually fixed. If you are starting from this section,
please use script "MedRec_Training12.1_PartialFix" for this exercise.
In the sample script, select the top node in the playback result for the passed session, and click
“Compute Similarity” button from the tool bar in the Results view to verify the similarities between the
recorded and playback contents returned from the server. This feature provides additional verification
to make sure the pages with passed result are truly passed.
Similarities will be displayed for each of the playback navigations. In the sample script, navigations in
steps 4 and 5 are showing large differences between recording and playback.
19
In the Result view, select the navigation that has differences, and check the Details view. The browser
tab is showing a Login Page. This is what the server returned during playback. Is this the expected
page..?
Click the Comparison Tab, and select “Content” from the pulldown menu. The differences can be seen
between the recorded and playback sessions.
20
Next, let’s check what we were supposed to receive, by looking at the recorded data. Select the node in
the playback result, right mouse click to select “Find in Tree”. This will highlight the corresponding
navigation in the script view.
Select the node in the script view, and look at the Details view’s Browser’s tab. This is what we were
supposed to see during playback as well. The page displayed in below screenshot looks quite different
from what we had in the playback. Although the result status of the script playback is “Passed”,
problems may be still exist in this script.
21
Let’s review what we did to fix this script. We created a correlation variable for the post data parameter,
“ViewState”, at step 2, and applied the same variable for the rest of the steps: 3, 4, 5 and 6.
However, looking closely at the recorded value for the VIewState parameter, they have different values
for each navigation. *Note: Display format of the variable is: {{variable_name, recorded_value}}
ď‚· Step3: 5543073521674880127:-1010958916263511605
ď‚· Step4: 5543073521674880127:-4678759601409353693
ď‚· Step5: 5543073521674880127:1169746943095084423
ď‚· Step6: 5543073521674880127:5310826972377202942
Variable Created
Variable Applied *
22
The problem occurred because we applied the same variable (which has the same value) to all the
navigations. To fix this, we will need to create and apply different variables for each navigation. Step 3
has a high similarity percentage (>99%). The browser page displayed is the same between recording and
playback, therefore we know the variable substitution for ViewState parameter is correct. The
ViewState parameter, however, would need to be fixed for Steps 4, 5, and 6.
From the script view, select the navigation in Step 4, double click to open Properties dialog, and click
“Substitute Variable” icon.
Select “Create new Variable” from the Script Variables node. Click Next.
23
In the “Search for a Value” dialog, accept the default Regular expression OpenScript suggested, and click
Next. Make sure the regular expression returns the expected value in the “Test Regular Expression”
dialog that opens next.
Name the Variable. I will name “MyVar_ViewState_4” in this example. Click Finish.
24
New variable is created. The value is retrieved from the contents from step 3, and applied to the Post
data navigation in Step 4.
You will need to repeat the same procedure to create and apply variables for the ViewState parameters
in the Steps 5, and 6.
Playback the script, and see the playback results. Similarities are more than 99% for all navigations, and
correct content is returned from the server. Now the problem in the script is completely fixed.
25
Please visit Oracle Application Testing Suite 12.x Video Series at the following URL:
http://apex.oracle.com/pls/apex/f?p=44785:24:0::::P24_CONTENT_ID,P24_PREV_PAGE:6587,1
Oracle Application Testing Suite
OpenScript for Load Testing
Script Troubleshooting
Hands-on Lab Exercise

More Related Content

What's hot

Performance Testing in Oracle Apps
Performance Testing in Oracle AppsPerformance Testing in Oracle Apps
Performance Testing in Oracle AppsBiswajit Pratihari
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIDinesh Kaushik
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven TestingMaveryx
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid frameworkSudhakar Mangi
 
Deployment automation framework with selenium
Deployment automation framework with seleniumDeployment automation framework with selenium
Deployment automation framework with seleniumWenhua Wang
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automationsrivinayak
 
Selenium Test Automation
Selenium Test AutomationSelenium Test Automation
Selenium Test AutomationBabuDevanandam
 
Application Testing Suite 9.2
Application Testing Suite 9.2Application Testing Suite 9.2
Application Testing Suite 9.2OracleVolutionSeries
 
Learn SoapUI
Learn SoapUILearn SoapUI
Learn SoapUIDavid Ionut
 
Soap UI - Lesson45
Soap UI - Lesson45Soap UI - Lesson45
Soap UI - Lesson45Qualitest
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Edureka!
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateAbhimanyu Singhal
 
SOAPUI Test Design & Utilities
SOAPUI Test Design & UtilitiesSOAPUI Test Design & Utilities
SOAPUI Test Design & UtilitiesAkshay Sharma
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting startedQualitest
 
Introduction to SoapUI day 2
Introduction to SoapUI day 2Introduction to SoapUI day 2
Introduction to SoapUI day 2Qualitest
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolSperasoft
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012Chen-Tien Tsai
 
Salesforce Developer Console ppt
Salesforce Developer Console  pptSalesforce Developer Console  ppt
Salesforce Developer Console pptKuhinoor Alom
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation FrameworkMindfire Solutions
 

What's hot (20)

Performance Testing in Oracle Apps
Performance Testing in Oracle AppsPerformance Testing in Oracle Apps
Performance Testing in Oracle Apps
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
 
Deployment automation framework with selenium
Deployment automation framework with seleniumDeployment automation framework with selenium
Deployment automation framework with selenium
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
 
Selenium Test Automation
Selenium Test AutomationSelenium Test Automation
Selenium Test Automation
 
Application Testing Suite 9.2
Application Testing Suite 9.2Application Testing Suite 9.2
Application Testing Suite 9.2
 
Learn SoapUI
Learn SoapUILearn SoapUI
Learn SoapUI
 
Soap UI - Lesson45
Soap UI - Lesson45Soap UI - Lesson45
Soap UI - Lesson45
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 Ultimate
 
SOAPUI Test Design & Utilities
SOAPUI Test Design & UtilitiesSOAPUI Test Design & Utilities
SOAPUI Test Design & Utilities
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting started
 
Introduction to SoapUI day 2
Introduction to SoapUI day 2Introduction to SoapUI day 2
Introduction to SoapUI day 2
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
 
Salesforce Developer Console ppt
Salesforce Developer Console  pptSalesforce Developer Console  ppt
Salesforce Developer Console ppt
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation Framework
 

Similar to OLT open script

AI Builder - Text Classification
AI Builder - Text ClassificationAI Builder - Text Classification
AI Builder - Text ClassificationCheah Eng Soon
 
White Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureWhite Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureShahzad
 
Rpt ppt
Rpt pptRpt ppt
Rpt pptsindhu T
 
Open sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesOpen sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesvikram sukumar
 
SCWCD : Handling exceptions : CHAP : 5
SCWCD : Handling exceptions : CHAP : 5SCWCD : Handling exceptions : CHAP : 5
SCWCD : Handling exceptions : CHAP : 5Ben Abdallah Helmi
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answersGaruda Trainings
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupBala Subra
 
Wap tquickstart
Wap tquickstartWap tquickstart
Wap tquickstartiqra_faqraz
 
Ch3- Java Script.pdf
Ch3- Java Script.pdfCh3- Java Script.pdf
Ch3- Java Script.pdfHASENSEID
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training MaterialsShekar S
 
Oracle business rules
Oracle business rulesOracle business rules
Oracle business rulesxavier john
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code projectPruthvi B Patil
 
E catt tutorial
E catt tutorialE catt tutorial
E catt tutorialNaveen Raj
 
Why Windows 8 drivers are buggy
Why Windows 8 drivers are buggyWhy Windows 8 drivers are buggy
Why Windows 8 drivers are buggyPVS-Studio
 
Cis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry universityCis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry universitylhkslkdh89009
 
About Qtp_1 92
About Qtp_1 92About Qtp_1 92
About Qtp_1 92techgajanan
 
About Qtp 92
About Qtp 92About Qtp 92
About Qtp 92techgajanan
 
ABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsAshley Menhennett
 
Java script basics
Java script basicsJava script basics
Java script basicsJohn Smith
 

Similar to OLT open script (20)

AI Builder - Text Classification
AI Builder - Text ClassificationAI Builder - Text Classification
AI Builder - Text Classification
 
White Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureWhite Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application Architecture
 
Rpt ppt
Rpt pptRpt ppt
Rpt ppt
 
Open sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesOpen sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercises
 
SCWCD : Handling exceptions : CHAP : 5
SCWCD : Handling exceptions : CHAP : 5SCWCD : Handling exceptions : CHAP : 5
SCWCD : Handling exceptions : CHAP : 5
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answers
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
 
Wap tquickstart
Wap tquickstartWap tquickstart
Wap tquickstart
 
Ch3- Java Script.pdf
Ch3- Java Script.pdfCh3- Java Script.pdf
Ch3- Java Script.pdf
 
Automation anywhere Training Materials
Automation anywhere Training MaterialsAutomation anywhere Training Materials
Automation anywhere Training Materials
 
Oracle business rules
Oracle business rulesOracle business rules
Oracle business rules
 
High performance coding practices code project
High performance coding practices code projectHigh performance coding practices code project
High performance coding practices code project
 
E catt tutorial
E catt tutorialE catt tutorial
E catt tutorial
 
Why Windows 8 drivers are buggy
Why Windows 8 drivers are buggyWhy Windows 8 drivers are buggy
Why Windows 8 drivers are buggy
 
Cis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry universityCis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry university
 
About QTP 9.2
About QTP 9.2About QTP 9.2
About QTP 9.2
 
About Qtp_1 92
About Qtp_1 92About Qtp_1 92
About Qtp_1 92
 
About Qtp 92
About Qtp 92About Qtp 92
About Qtp 92
 
ABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsABCs of Programming_eBook Contents
ABCs of Programming_eBook Contents
 
Java script basics
Java script basicsJava script basics
Java script basics
 

Recently uploaded

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo GarcĂ­a Lavilla
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 

Recently uploaded (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 

OLT open script

  • 1. 1 Oracle Application Testing Suite OpenScript for Load Testing Script Troubleshooting Hands-on Lab Exercise Contents Setting up Lab Environment .....................................................................................................................2 Script Debugging Review...........................................................................................................................3 Additional Script Debugging Method .....................................................................................................18 Introduction This document reviews the script debugging method that is used in the video training, “OpenScript Load Testing Troubleshooting Training” session. Click here to access the training in Oracle Learning Library. The exercise enables you to familiarize with the common debugging methods in OpenScript Load testing module. When you execute a load testing script that is recorded against your application, playback may fail with script error. This exercise document walks you through to understand how to analyze the error messages, compare the content and header information between recording and playback, identify the root cause of the playback problem, and apply custom correlation to resolve the problem.
  • 2. 2 Setting up Lab Environment The HOL exercise comes with three sample scripts. ď‚· MedRec_Training12.1_NoFix.zip: Script has no fix applied. When executed, it fails at step3. ď‚· MedRec_Training12.1_PartialFix.zip: Script has a partial fix (same fix done in the Video training). Passes all steps, but has hidden problems in the content returned. ď‚· MedRec_Training12.1_Fixed.zip: Script has the complete fix. When executed, it passes all steps with correct content loaded. Please use script “MedRec_Training12.1_NoFix” for this exercise. How to Import the script to your OpenScript: OpenScript menu File -> Import and select the MedRec_Training12.1_NoFix.zip file from your local file systems. The sample script runs against the Medical Record application that comes with your ATS installation. Please enable the sample application before running the scripts. The script requires OpenScript version 12.1 or higher. How to enable the Sample Application: Windows Start Menu -> ALL programs -> Oracle Application Testing Suites -> Samples ->Start Medrec Application. This will start the Medrec application. For more details on how to enable the sample application, please see “OATSGettingStaredGuide”, Chapter 3.1 Starting the Avitek Medical Records Sample Application”. Note: The script runs against your localhost. In some cases, it may not playback if a proxy is set in your OpenScript configuration. When you see this problem, please try removing the proxy settings from View -> OpenScript Preference -> Playback -> HTTP-> Proxy Settings.
  • 3. 3 Script Debugging Review Once the script MedRec_Training12.1_NoFix.zip is imported to your OpenScript 12.x, and MedRec application in your local system is enabled, click the playback button on the toolbar to execute the script. The script playback will execute the navigations and eventually fail with the error message “HTTP response code 500 Internal Server Error”. This is the problem you will resolve in this exercise. Select the Failed node in the Result view (bottom pane), and go to the Details view (upper right hand pane). Click the Comparison tab. This feature allows you to compare content, headers, cookies or resources information between recorded and playback, to help you identify the root cause of the navigation failure. Select Request Headers from the pull-down menu.
  • 4. 4 Scroll down to where you can see the Postdata parameters. Session IDs have the same values for recorded and playback. If the application expects different values for each playback for these session IDs, then the navigation may fail, as the values used in the script are no longer valid during playback. How to fix this problem? We will need to correlate the dynamic parameters so that they will use different values each time during playback, instead of the recorded data. Once again select the failed node in the Result view, and right mouse click to select “Find Failure in Tree”. This will highlight the corresponding navigation node in the Script view.
  • 5. 5 Expand the highlighted navigation in the Script view to display the PostData parameters. You will see the parameter values are hardcoded. The values may need to be correlated, in order to receive a correct response from the server. What are the Correlations in Load scripting? Let’s review. Correlations are required in OpenScript load scripts, when a server in AUT (application under test) exchanges dynamic session values with the browser. OpenScript tries to auto-correlate the session IDs. However, in some cases manual correlation is required. In the sample application, the server applies a dynamic session ID by embedding the value in an input type hidden field in the contents (step 2). The client then needs to send back the same session id to the server to notify who is sending the request, in the next navigation (step 3). The problem is that the session ID in step 3 is hard-coded, and uses the same value every time the script plays back.
  • 6. 6 As the server receives the WRONG value during playback, it cannot identify the sender of the request. That is why the script has a 500 Internal Server Error from the server. To fix this problem, we will need to manually correlate the parameter, so that it will pick up the dynamic value each time the script plays back. In the script view, select the PostData parameter you want to correlate. In this example, select the parameter “javax.faces.ViewState”. Then right mouse click to select “Substitute Variable”. “Substitute Variable” dialog opens. Select “Create New Variable” and click Next.
  • 7. 7 “Search for Value” dialog opens. You can search the contents of the earlier navigations, and specify where in the source you want to extract the dynamic value that you will apply to a “solve” variable that will be created later in the steps. You can also specify regular expression to retrieve the value at run- time during the playback. Don’t know the regular expression syntax? Don’t worry as OpenScirpt does auto-search and suggests a default regular expression for you. Here is what OpenScript suggested:
  • 8. 8 <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="(.+?)" I can accept the regular expression suggested, but I think it can be shorter to get the same result. So, I will modify the regular expression to the following. id="javax.faces.ViewState" value="(.+?)" I can either edit the Regular Expression itself, OR to simply re-select the content in the “Data” window, to auto create a regular expression. Click Next to go to the next dialog, “Test Regular Expression”. In the “Test Regular Expression” dialog, you can test out the Regular Expression you created in the previous step. Click the Test button, to see whether the results come up as a single correct value.
  • 9. 9 If you see multiple values with different results, then you will need to go back to the previous dialog to redefine the regular expression. This is because it was not robust enough to identify the value uniquely from the source. Make sure the test shows the satisfied result, and click Next to show “Create Variable” dialog. In this example, I will name the variable “MyVar_ViewState”, and click Finish.
  • 10. 10 Now the variable is created and applied to the selected parameter. Please go to the Script view, and see the navigation in Step 3. Double click the node to see the parameter details. Value before the correlation: 5543073521674880127:-1010958916263511605 Value after the correlation: {{MyVar_ViewState,5543073521674880127:-1010958916263511605}} Curly brackets indicate that the value is a variable. The variable Name is MyVar_ViewState, and the value after comma is a recorded value. The next time this script is executed, it will not use the recorded value for this parameter, but will use the value that is retrieved from the source, using the regular expression you specified & tested in the earlier steps. Let’s check where the value in the variable is coming from. Select the parameter node, right mouse click to select “Find Variable Source”
  • 11. 11 This will highlight the corresponding node in step2, which has a variable declaration that was applied to the parameter in step3. You will see a new SolveRegularExpression variable, MyVar_ViewState, is created under the navigation in step2. Select the HTML tab in the Details view, and re-select the SolveRegularExpression created in step2. The text highlighted in the HTML content is where the variable is retrieving the value from the source, and applying to the variable. Go ahead and playback the script to verify the fix applied. The script will pass Step 3, which is good news, however it will fail at Step4 with the same error message we saw before. HTTP response code 500, Internal Server Error.
  • 12. 12 First let’s check the result for Step 3. Select the navigation in Step3 and click the Browser tab in the Details view. Verify that the correct browser content is loaded. Then click the Comparison tab. Select Request Headers from the pulldown menu and scroll down to where it displays the Postdata parameters. Now, javax.faces.ViewState parameter is correlated. So we at least fixed the problem in step3.
  • 13. 13 Now let’s check what went wrong with Step4. What we need to do is the same practice. Select the Failed node in the Result view, and check the Comparison tab in the Details view. Scroll down to see the Postdata parameters. OK, you see what is the problem here. The ViewState parameter is again hardcoded. We will need to apply the same solution as we did to step3.
  • 14. 14 Select the failed node in the Result view, right mouse click and select “Find Failure in Tree”. This will highlight the corresponding navigation node in Step 4 of the Script view. Expand the navigation to display the Postdata parameters. As expected, session IDs are not correlated. We will need to apply the same solution for ViewState parameter as we did for Step 3. Select the parameter node, right mouse click to select “Substitute Variable”.
  • 15. 15 “Substitute Variable” dialog opens. You can create a new variable, but at this time we already have created a variable for ViewState parameter. You can find a custom parameter “MyVar_ViewState” shows up in the treeview. I “think” I can use this variable, so I will select the “MyVar_ViewState” node and click Finish to close the dialog. Confirm the parameter is correlated in the script view. Playback the script again, and verify now it passes Step 4… however it fails in Step 5 this time.
  • 16. 16 Expand the nodes in Step 5. The ViewState parameter is not correlated. Expand Step 6 to see that it has the same situation here as well. Now you have an idea what needs to be done next. We will need to correlate ViewState parameters for Step 5 and Step 6 too!
  • 17. 17 Select the parameter node in Step 5, right mouse click to select “Substitute Variable” to open the dialog. Select the custom parameter “MyVar_ViewState” and click Finish. This will correlate the ViewState parameter in Step 5. Repeat the same steps for Step 6. Playback the script. Now all steps have passed status. Finally, the script execution was successful. However, the correlation problem in the script has not been completely fixed yet. Although the playback result has “Passed” result for all navigations, there are still some hidden problems remaining in the script. Please see the next section “Additional Script Debugging Method” to work with this problem and fix your script completely.
  • 18. 18 Additional Script Debugging Method In fact, the solution applied in previous section, (and in the video training) did not completely resolve the correlation problem for the sample script yet. Although the script result has “Passed” status for all navigations, some hidden problems still need to be manually fixed. If you are starting from this section, please use script "MedRec_Training12.1_PartialFix" for this exercise. In the sample script, select the top node in the playback result for the passed session, and click “Compute Similarity” button from the tool bar in the Results view to verify the similarities between the recorded and playback contents returned from the server. This feature provides additional verification to make sure the pages with passed result are truly passed. Similarities will be displayed for each of the playback navigations. In the sample script, navigations in steps 4 and 5 are showing large differences between recording and playback.
  • 19. 19 In the Result view, select the navigation that has differences, and check the Details view. The browser tab is showing a Login Page. This is what the server returned during playback. Is this the expected page..? Click the Comparison Tab, and select “Content” from the pulldown menu. The differences can be seen between the recorded and playback sessions.
  • 20. 20 Next, let’s check what we were supposed to receive, by looking at the recorded data. Select the node in the playback result, right mouse click to select “Find in Tree”. This will highlight the corresponding navigation in the script view. Select the node in the script view, and look at the Details view’s Browser’s tab. This is what we were supposed to see during playback as well. The page displayed in below screenshot looks quite different from what we had in the playback. Although the result status of the script playback is “Passed”, problems may be still exist in this script.
  • 21. 21 Let’s review what we did to fix this script. We created a correlation variable for the post data parameter, “ViewState”, at step 2, and applied the same variable for the rest of the steps: 3, 4, 5 and 6. However, looking closely at the recorded value for the VIewState parameter, they have different values for each navigation. *Note: Display format of the variable is: {{variable_name, recorded_value}} ď‚· Step3: 5543073521674880127:-1010958916263511605 ď‚· Step4: 5543073521674880127:-4678759601409353693 ď‚· Step5: 5543073521674880127:1169746943095084423 ď‚· Step6: 5543073521674880127:5310826972377202942 Variable Created Variable Applied *
  • 22. 22 The problem occurred because we applied the same variable (which has the same value) to all the navigations. To fix this, we will need to create and apply different variables for each navigation. Step 3 has a high similarity percentage (>99%). The browser page displayed is the same between recording and playback, therefore we know the variable substitution for ViewState parameter is correct. The ViewState parameter, however, would need to be fixed for Steps 4, 5, and 6. From the script view, select the navigation in Step 4, double click to open Properties dialog, and click “Substitute Variable” icon. Select “Create new Variable” from the Script Variables node. Click Next.
  • 23. 23 In the “Search for a Value” dialog, accept the default Regular expression OpenScript suggested, and click Next. Make sure the regular expression returns the expected value in the “Test Regular Expression” dialog that opens next. Name the Variable. I will name “MyVar_ViewState_4” in this example. Click Finish.
  • 24. 24 New variable is created. The value is retrieved from the contents from step 3, and applied to the Post data navigation in Step 4. You will need to repeat the same procedure to create and apply variables for the ViewState parameters in the Steps 5, and 6. Playback the script, and see the playback results. Similarities are more than 99% for all navigations, and correct content is returned from the server. Now the problem in the script is completely fixed.
  • 25. 25 Please visit Oracle Application Testing Suite 12.x Video Series at the following URL: http://apex.oracle.com/pls/apex/f?p=44785:24:0::::P24_CONTENT_ID,P24_PREV_PAGE:6587,1 Oracle Application Testing Suite OpenScript for Load Testing Script Troubleshooting Hands-on Lab Exercise