SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Scripting Enhancements
Script Enhancements



◦
◦

Recording Scripts
Parameterization

User Parameters


◦

Correlation


◦
◦
◦

Function Helper Dialog
Regular Expression Extractor

Assertions
Listeners
Timers

Confidential

2
The Http proxy server is selected
for Configuring the recording
option.

Right Click WorkBench Add Non-Test Elements  HTTP Proxy Server
We are using the proxy server to record ,as the Browser is routed to JMeter port to record the
HTTP browser sessions .

Confidential

3
Select Target Controller settings

Port number is
entered

Select type of Grouping

Add patterns to be
included while recording.
E.g. Add “.*.html”
Start recording

Add patterns to be excluded while
recording. E.g. Add “.*.gif”

Confidential

4














Enter port number in the place provided as 8090.
Select the target controller – The requests will be targeted or recorded at the option
selected.
Select the grouping type – This option groups the requests according to the type selected.
Enter patterns to be included.
Enter patterns to be included.
Open Browser.
Click Tools -> Internet options -> Connections -> LAN settings.
Change IP of proxy to “localhost” and also the port number as 8090.
Click Start.
Traverse through the pages needed.
Close browser.
Click Stop in JMeter.

Confidential

5
Confidential

6


User Parameters
◦ Right Click the Request Add  Pre Processors User Parameters

Confidential

7


User Parameters
◦ The variable is specified by clicking the Add Variable button in the bottom of the panel
and filling in the Variable name in the 'Name:' column.
◦ To add a new value to the series, click the 'Add User' button and fill in the desired value
in the newly added column.
Similar to Unique each iteration in Load
Runner tool

Confidential

8
Values can be accessed
in any test component in
the same thread group,
using the syntax:
${SearchString}.

Make the number of
users in Thread
Properties to the number
of users assigned in the
User Parameter.

Confidential

9


Using Function
◦ Create a Txt File with the parameters in any location .
◦ Click Options  Function Helper Dialog in JMeter.
◦ Choose the function __StringFromFile.

Confidential

10
◦
◦
◦
◦
◦

Provide Full path of the location of file.
Provide a Name to the variable
Provide start File sequence Number as needed.
Click generate.
Copy and paste the value generated to the value of the variable which has to be
parameterized in the request.
◦ The data will be taken from the file while execution. This function can be used to provide
only one column of data.
◦ To use multiple columns, __CSVRead function can be used.

Confidential

11
Confidential

1
2
The generated value is
pasted here (exclude
variable name and
sequence number)

Confidential

13


Using Function
◦ Create a CSV File with the parameters in any location .
◦ Click Options  Function Helper Dialog in JMeter.
◦ Choose the function __CSVRead.

Confidential

14
Confidential

15
The generated
value is pasted here
with column 0

The generated
value is pasted here
with column 1

Confidential

16
Confidential

17
Substituting the correlated values

Confidential

18
Confidential

19


Using Regular Expression Extractor (Regex)
◦ Allows the user to extract values from a server response using a Perl-type regular
expression
◦ Extracts the requested values, generate the template string, and store the result into the
given variable name.
◦ Equivalent to Correlation.

Right Click the Request Add Post Processors Regular Expression Extractor
Confidential

2
0


The Regular Expression Extractor needs to be added in the previous request to capture the
dynamically changing data in the current request.

In the above figure, the SessionId has got recorded in the ‘LoginPageToPlannerPage’ request. To
capture the SessionId, the Regular Expression Extractor named ‘SessionId’ is included in the
previous request ‘HomePageToLoginPage’.
Confidential

21


Reference Name: The name of the variable where the dynamically parameterized value get stored.



Regular Expression: This must contain at least one set of parentheses "()" to capture a portion of the string.
And left and right boundary of the parameter to be correlated can also be given. In the given example:
(&BV_SessionID=)  Left Boundary of the SessionId within parentheses.
(.*)
 .* within parentheses signifies that any value between the left and right boundary has to
be captured. This .* is one of the patterns of regular expression. Other patterns include W,d etc.
(&BV_EngineID=)  Right Boundary of the SessionId within parentheses.



Template: The template is used to create a string from the matches found. It can be $0$, $1$, $2$.
From the given example, the parentheses break the expression into three groups: Left Boundary, SessionId
Value and Right Boundary. The value $2$ in the Template field signifies that the value in the second group i.e.
the SessionId value needs to be captured and assigned to the given variable.



Match No: Indicates which match to use. The regular expression may match multiple times.



Default Value: If no matches are found, then the value given in this field will be substituted. Hence, this value
needs to be empty.

Confidential

22
• Replace the value of variable which is to be Dynamically Parameterized as ${SessionId}

Confidential

23


Assertions allow you to assert facts about responses received from the server being tested.



You can assert that the response to a query will contain some particular text and check if
the correct response is received from the server.

Right Click the Request Add  Assertions Response Assertion

Confidential

24
Name for the Assertion

Text to check in the
web page

Confidential

25


To view Assertion Results , add Assertion Listener to the thread group while running the script.

Confidential

26
Asserted text found in Page

Asserted text not found in page

Confidential

27
 JMeter thread sends requests without pausing between each request.


Available Timers can be used to provide delay between the requests so that the server is not
loaded with requests in a short time.

Confidential

28
In the above figure, Constant Timers are added between the requests. The delay is given as 3000 milli seconds
i.e. 3 seconds.

Confidential

29
Confidential

30

Mais conteúdo relacionado

Destaque

Day3_Part 1_Apache_JMeter_Logic_Controllers
Day3_Part 1_Apache_JMeter_Logic_ControllersDay3_Part 1_Apache_JMeter_Logic_Controllers
Day3_Part 1_Apache_JMeter_Logic_ControllersSravanthi N
 
Social Media Week 2013 in Chicago
Social Media Week 2013 in Chicago Social Media Week 2013 in Chicago
Social Media Week 2013 in Chicago Victoria Gnatoka
 
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_Slave
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_SlaveDay5_Apache_JMeter_Test_Execution_RemoteMode_Master_Slave
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_SlaveSravanthi N
 
Day2_Apache_JMeter_Script_Enhancements
Day2_Apache_JMeter_Script_EnhancementsDay2_Apache_JMeter_Script_Enhancements
Day2_Apache_JMeter_Script_EnhancementsSravanthi N
 
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_ModeDay4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_ModeSravanthi N
 
Marketing Communications: social media case study
Marketing Communications: social media case studyMarketing Communications: social media case study
Marketing Communications: social media case studyVictoria Gnatoka
 
Environmental issues and Earth Hour Day
Environmental issues and Earth Hour DayEnvironmental issues and Earth Hour Day
Environmental issues and Earth Hour DayVictoria Gnatoka
 
Les enjeux de l'acquisition de trafic sur Internet
Les enjeux de l'acquisition de trafic sur InternetLes enjeux de l'acquisition de trafic sur Internet
Les enjeux de l'acquisition de trafic sur InternetBrigitte Neveu-Dérotrie
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewSravanthi N
 
Rethinking macroeconomic policy by IMF
Rethinking macroeconomic policy by IMFRethinking macroeconomic policy by IMF
Rethinking macroeconomic policy by IMFVictoria Gnatoka
 
TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6Sravanthi N
 
Retail and Food Marketing Retro Style
Retail and Food Marketing Retro StyleRetail and Food Marketing Retro Style
Retail and Food Marketing Retro StyleVictoria Gnatoka
 
Armadale Chiropractic Centre - Health & Wellness
Armadale Chiropractic Centre - Health & WellnessArmadale Chiropractic Centre - Health & Wellness
Armadale Chiropractic Centre - Health & WellnessMichael Black
 
Artificial intelligence study project
Artificial intelligence study projectArtificial intelligence study project
Artificial intelligence study projectVictoria Gnatoka
 
Conflict and negotiation presentation
Conflict and negotiation presentationConflict and negotiation presentation
Conflict and negotiation presentationVictoria Gnatoka
 

Destaque (17)

Social Media and NPD
Social Media and NPDSocial Media and NPD
Social Media and NPD
 
Day3_Part 1_Apache_JMeter_Logic_Controllers
Day3_Part 1_Apache_JMeter_Logic_ControllersDay3_Part 1_Apache_JMeter_Logic_Controllers
Day3_Part 1_Apache_JMeter_Logic_Controllers
 
Social Media Week 2013 in Chicago
Social Media Week 2013 in Chicago Social Media Week 2013 in Chicago
Social Media Week 2013 in Chicago
 
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_Slave
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_SlaveDay5_Apache_JMeter_Test_Execution_RemoteMode_Master_Slave
Day5_Apache_JMeter_Test_Execution_RemoteMode_Master_Slave
 
Day2_Apache_JMeter_Script_Enhancements
Day2_Apache_JMeter_Script_EnhancementsDay2_Apache_JMeter_Script_Enhancements
Day2_Apache_JMeter_Script_Enhancements
 
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_ModeDay4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
Day4_Part 1_Apache_JMeter_Performance_Test_Execution_GUI_Mode
 
Marketing Communications: social media case study
Marketing Communications: social media case studyMarketing Communications: social media case study
Marketing Communications: social media case study
 
Environmental issues and Earth Hour Day
Environmental issues and Earth Hour DayEnvironmental issues and Earth Hour Day
Environmental issues and Earth Hour Day
 
Les enjeux de l'acquisition de trafic sur Internet
Les enjeux de l'acquisition de trafic sur InternetLes enjeux de l'acquisition de trafic sur Internet
Les enjeux de l'acquisition de trafic sur Internet
 
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
 
Rethinking macroeconomic policy by IMF
Rethinking macroeconomic policy by IMFRethinking macroeconomic policy by IMF
Rethinking macroeconomic policy by IMF
 
TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6
 
Retail and Food Marketing Retro Style
Retail and Food Marketing Retro StyleRetail and Food Marketing Retro Style
Retail and Food Marketing Retro Style
 
Armadale Chiropractic Centre - Health & Wellness
Armadale Chiropractic Centre - Health & WellnessArmadale Chiropractic Centre - Health & Wellness
Armadale Chiropractic Centre - Health & Wellness
 
Artificial intelligence study project
Artificial intelligence study projectArtificial intelligence study project
Artificial intelligence study project
 
Conflict and negotiation presentation
Conflict and negotiation presentationConflict and negotiation presentation
Conflict and negotiation presentation
 
BMW Case Study Analysis
BMW Case Study AnalysisBMW Case Study Analysis
BMW Case Study Analysis
 

Semelhante a Day2 j meter_training_script_enhancements

Chapter 6 slides
Chapter 6 slidesChapter 6 slides
Chapter 6 slidesjdpike
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeterNaga Mallala
 
Auto fac mvc以及進階應用(一)
Auto fac mvc以及進階應用(一)Auto fac mvc以及進階應用(一)
Auto fac mvc以及進階應用(一)LearningTech
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp BookG.C Reddy
 
Stop hardcoding follow parameterization
Stop hardcoding  follow parameterizationStop hardcoding  follow parameterization
Stop hardcoding follow parameterizationPreeti Sagar
 
Control Transactions using PowerCenter
Control Transactions using PowerCenterControl Transactions using PowerCenter
Control Transactions using PowerCenterEdureka!
 
SCWCD : The servlet model : CHAP : 2
SCWCD  : The servlet model : CHAP : 2SCWCD  : The servlet model : CHAP : 2
SCWCD : The servlet model : CHAP : 2Ben Abdallah Helmi
 
C++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsC++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsTawnaDelatorrejs
 
Bt0083 server side programing
Bt0083 server side programing Bt0083 server side programing
Bt0083 server side programing Techglyphs
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworksVishwanath KC
 
Portlet Specification 3.0 Is Here!
Portlet Specification 3.0 Is Here! Portlet Specification 3.0 Is Here!
Portlet Specification 3.0 Is Here! Dev_Events
 
Informatica cloud Powercenter designer
Informatica cloud Powercenter designerInformatica cloud Powercenter designer
Informatica cloud Powercenter designerRameswara Reddy
 
Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)JISC.AM
 
Steps for csr generation sap netweaver
Steps for csr generation sap netweaverSteps for csr generation sap netweaver
Steps for csr generation sap netweaverrathiyash
 

Semelhante a Day2 j meter_training_script_enhancements (20)

Rpt ppt
Rpt pptRpt ppt
Rpt ppt
 
Chapter 6 slides
Chapter 6 slidesChapter 6 slides
Chapter 6 slides
 
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Auto fac mvc以及進階應用(一)
Auto fac mvc以及進階應用(一)Auto fac mvc以及進階應用(一)
Auto fac mvc以及進階應用(一)
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp Book
 
Stop hardcoding follow parameterization
Stop hardcoding  follow parameterizationStop hardcoding  follow parameterization
Stop hardcoding follow parameterization
 
Control Transactions using PowerCenter
Control Transactions using PowerCenterControl Transactions using PowerCenter
Control Transactions using PowerCenter
 
70562 (1)
70562 (1)70562 (1)
70562 (1)
 
SCWCD : The servlet model : CHAP : 2
SCWCD  : The servlet model : CHAP : 2SCWCD  : The servlet model : CHAP : 2
SCWCD : The servlet model : CHAP : 2
 
Android framework design and development
Android framework design and developmentAndroid framework design and development
Android framework design and development
 
C++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment InstructionsC++ Programming Class Creation Program Assignment Instructions
C++ Programming Class Creation Program Assignment Instructions
 
Bt0083 server side programing
Bt0083 server side programing Bt0083 server side programing
Bt0083 server side programing
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
data binding.docx
data binding.docxdata binding.docx
data binding.docx
 
Struts 2
Struts 2Struts 2
Struts 2
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Portlet Specification 3.0 Is Here!
Portlet Specification 3.0 Is Here! Portlet Specification 3.0 Is Here!
Portlet Specification 3.0 Is Here!
 
Informatica cloud Powercenter designer
Informatica cloud Powercenter designerInformatica cloud Powercenter designer
Informatica cloud Powercenter designer
 
Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)
 
Steps for csr generation sap netweaver
Steps for csr generation sap netweaverSteps for csr generation sap netweaver
Steps for csr generation sap netweaver
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
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
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
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
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Day2 j meter_training_script_enhancements

  • 2. Script Enhancements  ◦ ◦ Recording Scripts Parameterization  User Parameters  ◦ Correlation  ◦ ◦ ◦ Function Helper Dialog Regular Expression Extractor Assertions Listeners Timers Confidential 2
  • 3. The Http proxy server is selected for Configuring the recording option. Right Click WorkBench Add Non-Test Elements  HTTP Proxy Server We are using the proxy server to record ,as the Browser is routed to JMeter port to record the HTTP browser sessions . Confidential 3
  • 4. Select Target Controller settings Port number is entered Select type of Grouping Add patterns to be included while recording. E.g. Add “.*.html” Start recording Add patterns to be excluded while recording. E.g. Add “.*.gif” Confidential 4
  • 5.             Enter port number in the place provided as 8090. Select the target controller – The requests will be targeted or recorded at the option selected. Select the grouping type – This option groups the requests according to the type selected. Enter patterns to be included. Enter patterns to be included. Open Browser. Click Tools -> Internet options -> Connections -> LAN settings. Change IP of proxy to “localhost” and also the port number as 8090. Click Start. Traverse through the pages needed. Close browser. Click Stop in JMeter. Confidential 5
  • 7.  User Parameters ◦ Right Click the Request Add  Pre Processors User Parameters Confidential 7
  • 8.  User Parameters ◦ The variable is specified by clicking the Add Variable button in the bottom of the panel and filling in the Variable name in the 'Name:' column. ◦ To add a new value to the series, click the 'Add User' button and fill in the desired value in the newly added column. Similar to Unique each iteration in Load Runner tool Confidential 8
  • 9. Values can be accessed in any test component in the same thread group, using the syntax: ${SearchString}. Make the number of users in Thread Properties to the number of users assigned in the User Parameter. Confidential 9
  • 10.  Using Function ◦ Create a Txt File with the parameters in any location . ◦ Click Options  Function Helper Dialog in JMeter. ◦ Choose the function __StringFromFile. Confidential 10
  • 11. ◦ ◦ ◦ ◦ ◦ Provide Full path of the location of file. Provide a Name to the variable Provide start File sequence Number as needed. Click generate. Copy and paste the value generated to the value of the variable which has to be parameterized in the request. ◦ The data will be taken from the file while execution. This function can be used to provide only one column of data. ◦ To use multiple columns, __CSVRead function can be used. Confidential 11
  • 13. The generated value is pasted here (exclude variable name and sequence number) Confidential 13
  • 14.  Using Function ◦ Create a CSV File with the parameters in any location . ◦ Click Options  Function Helper Dialog in JMeter. ◦ Choose the function __CSVRead. Confidential 14
  • 16. The generated value is pasted here with column 0 The generated value is pasted here with column 1 Confidential 16
  • 18. Substituting the correlated values Confidential 18
  • 20.  Using Regular Expression Extractor (Regex) ◦ Allows the user to extract values from a server response using a Perl-type regular expression ◦ Extracts the requested values, generate the template string, and store the result into the given variable name. ◦ Equivalent to Correlation. Right Click the Request Add Post Processors Regular Expression Extractor Confidential 2 0
  • 21.  The Regular Expression Extractor needs to be added in the previous request to capture the dynamically changing data in the current request. In the above figure, the SessionId has got recorded in the ‘LoginPageToPlannerPage’ request. To capture the SessionId, the Regular Expression Extractor named ‘SessionId’ is included in the previous request ‘HomePageToLoginPage’. Confidential 21
  • 22.  Reference Name: The name of the variable where the dynamically parameterized value get stored.  Regular Expression: This must contain at least one set of parentheses "()" to capture a portion of the string. And left and right boundary of the parameter to be correlated can also be given. In the given example: (&BV_SessionID=)  Left Boundary of the SessionId within parentheses. (.*)  .* within parentheses signifies that any value between the left and right boundary has to be captured. This .* is one of the patterns of regular expression. Other patterns include W,d etc. (&BV_EngineID=)  Right Boundary of the SessionId within parentheses.  Template: The template is used to create a string from the matches found. It can be $0$, $1$, $2$. From the given example, the parentheses break the expression into three groups: Left Boundary, SessionId Value and Right Boundary. The value $2$ in the Template field signifies that the value in the second group i.e. the SessionId value needs to be captured and assigned to the given variable.  Match No: Indicates which match to use. The regular expression may match multiple times.  Default Value: If no matches are found, then the value given in this field will be substituted. Hence, this value needs to be empty. Confidential 22
  • 23. • Replace the value of variable which is to be Dynamically Parameterized as ${SessionId} Confidential 23
  • 24.  Assertions allow you to assert facts about responses received from the server being tested.  You can assert that the response to a query will contain some particular text and check if the correct response is received from the server. Right Click the Request Add  Assertions Response Assertion Confidential 24
  • 25. Name for the Assertion Text to check in the web page Confidential 25
  • 26.  To view Assertion Results , add Assertion Listener to the thread group while running the script. Confidential 26
  • 27. Asserted text found in Page Asserted text not found in page Confidential 27
  • 28.  JMeter thread sends requests without pausing between each request.  Available Timers can be used to provide delay between the requests so that the server is not loaded with requests in a short time. Confidential 28
  • 29. In the above figure, Constant Timers are added between the requests. The delay is given as 3000 milli seconds i.e. 3 seconds. Confidential 29