An open API service indexing awesome lists of open source software.

https://github.com/qainsights/jmeter-exercises

Practice JMeter using Pet Store application 🎯
https://github.com/qainsights/jmeter-exercises

apache-jmeter jmeter jmeter-exercise load-testing performance-testing scripting

Last synced: 5 months ago
JSON representation

Practice JMeter using Pet Store application 🎯

Awesome Lists containing this project

README

          

# ⚡ Apache JMeter Exercises
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-1EAEDB)]()
[![saythanks](https://img.shields.io/badge/say-thanks-1EAEDB.svg)](https://saythanks.io/to/catch.nkn%40gmail.com)
[![](https://img.shields.io/badge/license-MIT-0a0a0a.svg?style=flat&colorA=1EAEDB)](https://qainsights.com)
[![](https://img.shields.io/badge/%E2%9D%A4-QAInsights-0a0a0a.svg?style=flat&colorA=1EAEDB)](https://qainsights.com)
[![](https://img.shields.io/badge/%E2%9D%A4-YouTube%20Channel-0a0a0a.svg?style=flat&colorA=1EAEDB)](https://www.youtube.com/user/QAInsights?sub_confirmation=1)
[![](https://img.shields.io/badge/donate-paypal-1EAEDB)](https://www.paypal.com/paypalme/NAVEENKUMARN)

![JMeter Exercise](./assets/JMeter-Exercise.png)

These exercises were designed to learn JMeter by doing. This exercise series is a part of **Performance Testing Trilogy 🔺**.

Looking for LoadRunner Exercises? [Here it is](https://github.com/QAInsights/LoadRunner-Exercises).

> Currently these series under active development.

# ⚠ Important Notes

- 🛑 Please do not inject any load into the below mentioned demo web application.
- 🆘 If you do not know how to proceed with the exercises, please raise an issue. I will help you out. But before that, please watch all my JMeter tutorials in [YouTube](https://www.youtube.com/playlist?list=PLJ9A48W0kpRIjLkZ32Do9yDZXnnm7_uj_) 📽.

# 🛠 Enviroment Setup

Below exercises were created using the following configurations:

- [Apache JMeter 5.4.1](https://jmeter.apache.org/)
- **Sampler**: HTTP Sampler
- **OS**: Windows 10 Pro 10.0.19041 Build 19041
- CPU 2 Cores, 4 Logical Processors and Intel Core i7-7500U CPU @ 2.70GHz

| Component | Version |
| --------- | ------- |
| Apache JMeter | 5.4.1 |
| JMeter Plugins | 1.6 |
| OpenJDK | 15 |

# 🏑 Exercises


00 Record the simple business flow



- Start recording
- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Click on `Fish`
- Click on the product ID
- Click on `Return to FISH`
- Stop recording
- Add a `View Results Tree` listener
- Run the test plan
- Go thru each sampler response data




10 Use CSV Data Set Config for the products [Fish, Dogs, etc.]



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Click on `Fish`

Use CSV Data Set Config for the products and then Replay.

Hint: `https://petstore.octoperf.com/actions/Catalog.action?viewCategory=&categoryId=`




30 Extract the footer text



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Extract the footer text `www.mybatis.org`




40 Extract the Title text



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Extract the title

Hint: Use `` tags in `Boundary Extractor`




50 Extract the types of products



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Extract the types of products and its count

Hint: Use `href="/actions/Catalog.action?viewCategory=&categoryId=(.+?)"`




60 Validate Cart



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Click on the cart icon
- Validate the text `Your cart is empty.` and the cart total `$0.00`




70 Find all the hyperlinks



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Find all the hyperlinks
- Print them in the `Log Viewer`




80 Update Cart up to $100 worth of items



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Add items to the cart upto $100 worth




90 Register an Account



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Click on `Sign in`
- Click on `Register Now`
- Fill the mandatory details
- Click on `Save Account Information`
- Login with the credentials you created
- Logoff




100 Login, Search, and Logoff



- Launch [Pet Store](https://petstore.octoperf.com/actions/Catalog.action) application
- Click on `Sign in`
- Enter the credentials you created in previous exercise
- Perform a search for `ES`
- Click on `Search`
- Click on the product
- Click on `Sign Out`



# ⏭ What's next?

* [LoadRunner Exercises](https://github.com/QAInsights/LoadRunner-Exercises)

# 💰 Donate
Buy me a tea