Gatling Step by Step Masterclass | Part 5

  Рет қаралды 816

Automation Step by Step

Automation Step by Step

Күн бұрын

00:00 Intro
00:56 What is Correlation (Chaining)
02:38 Demo of Correlation in Gatling
10:52 How to use Correlation in Gatling Scripts
14:32 How to use Regular Expression
28:20 How to run maven commands
32:30 How to run specific test simulation
34:39 How to run multiple test simulation
37:04 Assertions
40:58 Assertions scope
47:37 Gatling with VCS and CI Tools
49:28 Gatling Enterprise
01:11:11 Before doing any Performance Testing
01:16:23 Summary and next steps
What is Correlation
The process of extracting some value from the response of a step and referring it into the request of other subsequent step is called correlation
(Referencing is done dynamically - at runtime)
Dynamic Referencing
Extract dynamic value from the response of a step
Refer the extracted value in the request of a subsequent step
Why is it required
In a Test there may be a need to refer values from earlier steps which cannot be determined prior to test execution as these are generated at runtime
D E M O
How to use Correlation with
JSON Path
Regular Expression
in Gatling Scripts
Command Line
How to run maven commands
How to run specific test simulation
How to run multiple test simulation
Open command line and goto the location of project folder
Try these commands:
mvn -version
mvn clean gatling:help
mvn clean gatling:verify
mvn clean gatling:recorder
mvn clean gatling:test
mvn clean gatling:test -Dgatling.simulationClass=com….Sim1
Can try running the Engine and Recorder classes manually and check
To run Multiple Simulations with mvn gatling:test
Add runMultipleSimulations in pom.xml
Ref: gatling.io/docs/gatling/refer...
Assertions
How to add Assertions
Assertions allow you to set expectations on metrics like response time, number of failed requests, throughput
Assertions are defined within the setUp block
Step 1 - Create a Simple Gatling Simulation script
Step 2 - In the setUp section add assertions
setUp(
scn.inject(atOnceUsers(1)).protocols(httpProtocol)
).assertions(
global.responseTime.max.lt(500), // Max response time should be less than 500 ms
global.successfulRequests.percent.gt(95) // At least 95% successful requests
)
Step 3 - Run the test and check reports
Assertions Examples
global.responseTime.max.lt(100) // Maximum response time should be less than 100 milliseconds
global.requestsPerSec.gt(50) // At least 50 requests per second
global.successfulRequests.percent.gt(95) // At least 95% successful requests
global.failedRequests.count.lt(10) // Less than 10 failed requests
global.responseTime.percentile(99).lt(200) // 99th percentile response time should be less than 200 milliseconds
details("MyRequest").failedRequests.percent.lt(5) // For request named "MyRequest", less than 5% failures
Assertions Scope
global: use statistics calculated from all requests
forAll: use statistics calculated for each individual request
details(path): use statistics calculated from a group or a request
//global assertions
setUp(scn.inject(atOnceUsers(10)).protocols(httpProtocol))
.assertions(
global.responseTime.max.lt(500), // Max response time should be less than 500 ms
global.successfulRequests.percent.gt(95) // At least 95% successful requests
)
// forAll assertions
setUp(scn.inject(atOnceUsers(10)).protocols(httpProtocol))
.assertions(
forAll.failedRequests.percent.lt(5) // Less than 5% failed requests
)
// details assertions
setUp(scn.inject(atOnceUsers(10)).protocols(httpProtocol))
.assertions(
details("Create Computer").responseTime.percentile3.lt(200) // 3rd percentile response time < 200 ms
)
Gatling with VCS Tool
Gatling with Git - • Gatling Beginner Tutor...
Gatling Enterprise
What is Gatling Enterprise
How to setup Gatling Enterprise on Cloud
Explore Gatling Enterprise Web UI
How to upload and run tests on Gatling Enterprise
Gatling with CI Tool
Gatling with Jenkins - • Gatling Beginner Tutor...
Jenkins + Git - • Gatling Beginner Tutor...
Before doing any Performance Testing…
Always do ethical performance testing
Never do performance testing on your primary systems/devices
Never do performance testing on primary accounts/apps
Always use separate test systems and accounts
Setup a separate QA/Test env for performance testing
Always test with same infrastructure, configuration, network
Get the metrics for performance test or create a baseline
Create realistic tests (add breathing/think time)
Always take written permissions from the owners/clients/managers
Always document your results
Document - tinyurl.com/GatlingDoc1-Ragha...
▬▬▬▬▬▬▬
Share with all who may need this
If my work has helped you, consider helping any animal near you, in any way you can
Never Stop Learning
Raghav Pal
AutomationStepByStep.com/
▬▬

Пікірлер: 6
@xXMrThomasXx
@xXMrThomasXx 23 күн бұрын
Thank you for all your work :) I completed all course . You have right, never stop learning, this is my new motto :D
@RaghavPal
@RaghavPal 22 күн бұрын
Great to hear! all the best
@divakarkannan2372
@divakarkannan2372 27 күн бұрын
Excellent bro thanks lots
@RaghavPal
@RaghavPal 27 күн бұрын
Welcome Divakar
@achyuthkala3846
@achyuthkala3846 3 ай бұрын
Sir, i am a manual tester, i need to start learning the Automation so at present which course should I start.
@RaghavPal
@RaghavPal 3 ай бұрын
Achyuth As a manual tester looking to transition into automation, here are some steps you can take to get started: 1. Learn Programming Basics: - Start by learning a programming language. Python is an excellent choice for beginners due to its readability and versatility. It's widely used in test automation. - Online platforms like Codecademy, Coursera, or edX offer introductory Python courses. 2. Understand Automation Concepts: - Familiarize yourself with the fundamentals of test automation: - Test Frameworks: Learn about popular frameworks like Selenium, Appium, or Cypress. - Test Data Management: Understand how to handle test data in automated tests. - Assertions and Verifications: Explore techniques for verifying expected outcomes. - Test Reporting: Learn how to generate meaningful reports. 3. Explore Selenium WebDriver: - Selenium is widely used for web automation. Start with Selenium WebDriver: - Learn how to set up Selenium in your preferred programming language. - Write simple scripts to automate basic tasks like opening a browser, navigating to a website, and interacting with elements. 4. Hands-On Practice: - Practice is crucial. Create a small project where you automate a simple scenario (e.g., logging into a website, searching, or filling out forms). - Use version control (e.g., Git) to manage your code. 5. Online Courses and Tutorials: - Enroll in online courses specifically focused on test automation. Websites like Udemy, Pluralsight, and LinkedIn Learning offer relevant courses. - Look for courses covering topics like Selenium, API testing, and test automation best practices. 6. API Testing: - APIs (Application Programming Interfaces) play a significant role in modern applications. Learn how to test APIs using tools like Postman or directly with Python libraries. 7. Continuous Integration (CI): - Understand CI/CD concepts. Tools like Jenkins, Travis CI, or GitLab CI/CD integrate test automation into your development pipeline. 8. Explore Mobile Automation (Optional): - If you're interested in mobile app testing, explore tools like Appium for automating mobile applications. 9. Read Blogs and Stay Updated: - Follow testing blogs, forums, and communities. Stay informed about the latest trends and best practices. 10. Practice Problem-Solving: - Leverage platforms like HackerRank or LeetCode to improve your problem-solving skills. Remember, automation is a journey. Start small, build your skills gradually, and don't hesitate to ask questions or seek help from the testing community. all the best..
Playwright Beginner Tutorial 2 | How to install
25:46
Automation Step by Step
Рет қаралды 131 М.
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 85 МЛН
Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]
3:36:55
TechWorld with Nana
Рет қаралды 8 МЛН
Testim Beginner Tutorial 3 | Top Features of Testim with DEMO
32:45
Automation Step by Step
Рет қаралды 2,6 М.
What are environment variables How do they work
30:14
Automation Step by Step
Рет қаралды 2,9 М.
4 | Appium Step by Step | How to create Android Virtual Device
53:28
Automation Step by Step
Рет қаралды 2,7 М.
Appium Setup On Windows Platform | 2024 Latest Setup
50:05
AUTOMATION WITH PRIYANKA
Рет қаралды 6 М.
Gatling Step by Step Masterclass | Part 4
1:07:32
Automation Step by Step
Рет қаралды 880
Gatling Beginners Tutorial | Correlation | Dynamic Referencing
20:42
Automation Step by Step
Рет қаралды 1 М.
Cypress Complete Beginners Masterclass 1 | Step by Step | Raghav Pal |
1:20:54
Automation Step by Step
Рет қаралды 187 М.
Playwright Beginner Tutorial 3 | How to run tests
14:46
Automation Step by Step
Рет қаралды 93 М.