SlideShare une entreprise Scribd logo
1  sur  4
 1. Go to JMETER_HOME/bin and start Jmeter with jmeterw.cmd on windows and jmeter.sh on unix
 2. Select “Test Plan” on the tree
 3. Right click on the “Test Plan” and add a new thread group: Add -> Threads (Users) -> Thread Group
 4. Select the Thread Group
 5. Right click “Add -> Config Element -> Http Request Defaults”
 6. In new HTTP Request Defaults element: Server name – enter “
 url of the site” e.g. http://www.konakart.com/konakart/Welcome.action
 7. Path – leave blank
 8. Right click on the “Thread Group” and add a recording controller: Add > Logic Controller >
 Recording Controller
 9.Select WorkBench
 10.Right click on WorkBench and add the recorder: Add -> Non-Test Elements -> HTTP(S) Test Script Recorder
 11.Port field - Enter “8080”
 12.Click the “add” button in “URL Patterns to Include”.
 This will create a blank entry.
 13.Enter “.*.html”
 14.Click the “add” button in “Patterns to exclude”.
 This will create a blank entry.
 15.Enter “.*.(bmp|css|gif|pnp|jpg)”
 16.Click the “start” button at the bottom
 17.Start the browser, but do not close JMeter.
 18.From the tool bar, click “tools -> internet options”. This should bring up the options.
 19.Select the “connection” tab
 20.Click “lan settings” button near the bottom.
 21.On the connections tab, check “Use a proxy server for your LAN”. The address and port
 fields should be enabled now.
 22.Address – enter “Localhost” or the IP address of your system
 23.Port – enter “9090”.
 24.Click “ok” button
 25.Click “ok” button again. This should return you to the browser
 26.In the “Address” bar at the top, enter a url /” and hit the “enter” key.
 27.Click on a few links on JMeter's Demo site.
 28.Close browser and bring up the JMeter window.
1
 Exercise 2 –Using Badboy with JMeter
 1. BadBoy tool is an simple automation tool. With this tool we can record script and can export as jmeter script (.jmx).
 2. Exporting a script in JMeter format is very simple. Simply record your script and navigate to File->Export to Jmeter
 Exercise 3 – Xpath Extractor
 Steps for correlating the Event validation values:
 1. Run the script containing the both the above stated operations
 2. Go to Response tab (Text mode) in “View Result Tree” listener of “Grafic_Cards” operation.
 3. From the bottom, select the XPath Tester from the dropdown
 3. Create a Xpath extractor expression for extracting the value of product name.
 //div[contains(@class,'item-row')]//a[2]/text()
 4. Go to http request under “Search product” transaction controller-> Add -> Post Processor -> Xpath Extractor.
 5. The reference name inserted is the name of the variable that will capture the name.
 6. Go to Search product event (/konakart/QuickSearch.action) and change the searchText parameter with the variable
defined in the Xpath Extractor
 7. Run the Test plan again

2
 Exercise 4 - Regular Expression Extractor
 Steps for correlating the Event validation values:
 1. Run the script containing the both the above stated operations
 2. Go to Response tab (Text mode) in “View Result Tree” listener of “Search product” operation.
 3. From the bottom, select the RegEx Tester from the dropdown
 3. Create a Regular expression for extracting the value of product variable’s value.
 <a class="item-title" href="SelectProd.action.^?prodId=(.+?)" >${product_name}</a>

 4. Go to http request under “Search product” transaction controller-> Add -> Post Processor -> Regular
Expression Extractor.
 5. The reference name inserted is the name of the variable created that will capture the value product id.
 6. Go to click item event (/konakart/SelectProd.action?prodId) and change the action parameter with the
defined parameter from the Regular Expression
 7. Run the Test plan again
3
 Exercise 5 - Parameterization through Jmeter
 Scenario for recording:
 User is navigate to homepage of the site http://www.konakart.com/konakart/Welcome.action
 From homepage is clicking the My account link from the header - https://www.konakart.com/konakart/LogIn.action
 Click Register An Account link - https://www.konakart.com/konakart/CustomerRegistration.action?forceReg=true
 Provide some valid information's in the mandatory fields (select country Romania)
 Click Continue button
 Click at Log Off link from the header
 1. First of all you need to have recorded steps for the create account action. Then identify the request/call that is associated
with the create action (POST) and find the parameter that has parameter value as email address that we have recorded.
 2. Now we have to parameterize this parameter . For this we will use “CSV Data Set Config”. Click on Thread group-> Add-
>Config Element->CSV Data Set Config.
 3. Create a CSV file containing elements that can be used as email parameter value.
 4. Now come to JMeter and place “CSV Data Set Config” control anywhere before the request/call that has the email -
parameter. Next we need to configure the “CSV Data Set Config” control. In the file name text box - enter the name of the
CSV file along with the whole path. If the CSV file is in the same directory where the JMeter script is located then the path
can be omitted. In the variable name textbox - enter any valid variable name.
 5. Now go to the parameter that has static email value. In the parameter value of that parameter write “${name of the
variable created in step 4}”
 6. Now on running the load test, for more than 1 user or for more than 1 iterations, at each execution a new value will be
fetched from the CSV file (this can be verified from the “View Result Tree” listener).
4

Contenu connexe

Dernier

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Dernier (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Exercises of ISTC In-Depth Second Edition Part II - Take Your First Bite of JMeter

  • 1.  1. Go to JMETER_HOME/bin and start Jmeter with jmeterw.cmd on windows and jmeter.sh on unix  2. Select “Test Plan” on the tree  3. Right click on the “Test Plan” and add a new thread group: Add -> Threads (Users) -> Thread Group  4. Select the Thread Group  5. Right click “Add -> Config Element -> Http Request Defaults”  6. In new HTTP Request Defaults element: Server name – enter “  url of the site” e.g. http://www.konakart.com/konakart/Welcome.action  7. Path – leave blank  8. Right click on the “Thread Group” and add a recording controller: Add > Logic Controller >  Recording Controller  9.Select WorkBench  10.Right click on WorkBench and add the recorder: Add -> Non-Test Elements -> HTTP(S) Test Script Recorder  11.Port field - Enter “8080”  12.Click the “add” button in “URL Patterns to Include”.  This will create a blank entry.  13.Enter “.*.html”  14.Click the “add” button in “Patterns to exclude”.  This will create a blank entry.  15.Enter “.*.(bmp|css|gif|pnp|jpg)”  16.Click the “start” button at the bottom  17.Start the browser, but do not close JMeter.  18.From the tool bar, click “tools -> internet options”. This should bring up the options.  19.Select the “connection” tab  20.Click “lan settings” button near the bottom.  21.On the connections tab, check “Use a proxy server for your LAN”. The address and port  fields should be enabled now.  22.Address – enter “Localhost” or the IP address of your system  23.Port – enter “9090”.  24.Click “ok” button  25.Click “ok” button again. This should return you to the browser  26.In the “Address” bar at the top, enter a url /” and hit the “enter” key.  27.Click on a few links on JMeter's Demo site.  28.Close browser and bring up the JMeter window. 1
  • 2.  Exercise 2 –Using Badboy with JMeter  1. BadBoy tool is an simple automation tool. With this tool we can record script and can export as jmeter script (.jmx).  2. Exporting a script in JMeter format is very simple. Simply record your script and navigate to File->Export to Jmeter  Exercise 3 – Xpath Extractor  Steps for correlating the Event validation values:  1. Run the script containing the both the above stated operations  2. Go to Response tab (Text mode) in “View Result Tree” listener of “Grafic_Cards” operation.  3. From the bottom, select the XPath Tester from the dropdown  3. Create a Xpath extractor expression for extracting the value of product name.  //div[contains(@class,'item-row')]//a[2]/text()  4. Go to http request under “Search product” transaction controller-> Add -> Post Processor -> Xpath Extractor.  5. The reference name inserted is the name of the variable that will capture the name.  6. Go to Search product event (/konakart/QuickSearch.action) and change the searchText parameter with the variable defined in the Xpath Extractor  7. Run the Test plan again  2
  • 3.  Exercise 4 - Regular Expression Extractor  Steps for correlating the Event validation values:  1. Run the script containing the both the above stated operations  2. Go to Response tab (Text mode) in “View Result Tree” listener of “Search product” operation.  3. From the bottom, select the RegEx Tester from the dropdown  3. Create a Regular expression for extracting the value of product variable’s value.  <a class="item-title" href="SelectProd.action.^?prodId=(.+?)" >${product_name}</a>   4. Go to http request under “Search product” transaction controller-> Add -> Post Processor -> Regular Expression Extractor.  5. The reference name inserted is the name of the variable created that will capture the value product id.  6. Go to click item event (/konakart/SelectProd.action?prodId) and change the action parameter with the defined parameter from the Regular Expression  7. Run the Test plan again 3
  • 4.  Exercise 5 - Parameterization through Jmeter  Scenario for recording:  User is navigate to homepage of the site http://www.konakart.com/konakart/Welcome.action  From homepage is clicking the My account link from the header - https://www.konakart.com/konakart/LogIn.action  Click Register An Account link - https://www.konakart.com/konakart/CustomerRegistration.action?forceReg=true  Provide some valid information's in the mandatory fields (select country Romania)  Click Continue button  Click at Log Off link from the header  1. First of all you need to have recorded steps for the create account action. Then identify the request/call that is associated with the create action (POST) and find the parameter that has parameter value as email address that we have recorded.  2. Now we have to parameterize this parameter . For this we will use “CSV Data Set Config”. Click on Thread group-> Add- >Config Element->CSV Data Set Config.  3. Create a CSV file containing elements that can be used as email parameter value.  4. Now come to JMeter and place “CSV Data Set Config” control anywhere before the request/call that has the email - parameter. Next we need to configure the “CSV Data Set Config” control. In the file name text box - enter the name of the CSV file along with the whole path. If the CSV file is in the same directory where the JMeter script is located then the path can be omitted. In the variable name textbox - enter any valid variable name.  5. Now go to the parameter that has static email value. In the parameter value of that parameter write “${name of the variable created in step 4}”  6. Now on running the load test, for more than 1 user or for more than 1 iterations, at each execution a new value will be fetched from the CSV file (this can be verified from the “View Result Tree” listener). 4