Перейти к содержимому

Building your first Gatling load test in minutes

Gatling Corp

0:00 / 0:00

Building your first Gatling load test in minutes

43 просмотра · 7 дн. назад
Gatling Corp
837 подписчиков
43 просмотра · 7 дн. назад
Run your first Gatling load test in Java in about 10 minutes. No starter project, no cloning a repo: just a folder, a pom.xml, and one Java class. In this tutorial you'll go from an empty directory to a full HTML performance report in 5 steps: 1. Verify your JDK (11 to 25) and Maven install 2. Add a pom.xml with the Gatling charts library and the Gatling Maven plugin 3. Write a simulation: imports, HTTP protocol config, a user scenario, and an injection profile with assertions 4. Run it with mvn gatling:test 5. Read the report: response time percentiles (p95, p99) and throughput You'll also see how to find the API endpoints worth testing by using your browser's DevTools Network tab (filter on Fetch/XHR, click through the site, copy the request into your simulation). The test in this video injects 5 users per second for 30 seconds and fails the build if the success rate drops below 99%. Change two numbers and you have your own load profile. Running this test on Enterprise will unlock way more additional features like dynamic, shareable dashboards, full history, trends and campaign-level view, SLO tracking and run comparison, and AI-powered summaries Join our next live demo here: https://gatling.io/gatling-enterprise... 🔗 RESOURCES Gatling on GitHub (open source, Apache 2.0): https://github.com/gatling/gatling Gatling documentation: https://docs.gatling.io ⏱️ TIMESTAMPS 0:00 Intro: a load test with no starter project 0:45 What is Gatling? 1:42 Step 1: Check your JDK and Maven 2:30 Step 2: Add the pom.xml (dependencies + Maven plugin) 3:58 Step 3: Create the simulation class and imports 4:40 Configure the HTTP protocol (base URL + headers) 5:05 Write the scenario (requests, checks, pauses) 5:43 Injection profile and assertions 6:15 Find API endpoints with the DevTools Network tab 7:30 Add the endpoints to your simulation 8:12 Step 4: Run the test with mvn gatling:test 9:23 Step 5: Open the HTML report 9:45 Response time distribution and percentiles (p95, p99) 11:05 Requests per second: did the load ramp and hold? 11:23 Recap and next steps 💬 What API are you load testing first? Tell us in the comments. 👍 Subscribe for more load testing tutorials in Java, JavaScript, TypeScript, Kotlin, and Scala. #Gatling #LoadTesting #PerformanceTesting #Java #Maven #APITesting