Gatling Step by Step Masterclass | Part 3

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • All Free Tutorials 🟢 AutomationStepByStep.com/
    00:00 Intro
    01:24 Simulation Script
    02:48 Parts of Simulation Script
    10:18 How to create isolated resuable modules
    16:55 Divide scenario into smaller modules
    23:37 Define scenario using reusable modules
    32:56 Virtual users setup
    42:34 Next steps
    What is Simulation in Gatling
    Simulation is the description of the load test written in script
    Can be written in Java, Scala, Kotlin
    Consists of scenarios, http configuration, user load etc
    Parts of Gatling Simulation Script
    1. Package (optional)
    2. Imports (required)
    3. Class declaration (extends Simulation)
    4. Common configuration for all requests
    5. Base URL (prepended to all relative urls)
    6. Common HTTP headers (will be sent with all requests)
    7. Scenario definition
    8. HTTP requests (this name will be shown in reports)
    9. Request url and other details
    10. Pause / Think Time
    11. Scenario setup simulation (users) - setUp method is mandatory
    12. Attaching http configuration declared above
    Isolate Modules
    Divide Scenario into Isolated Modules / Processes
    Step 1 - Record / Create a Gatling Simulation script
    Step 2 - Give names to the requests
    Step 3 - Divide scenario into smaller modules
    Step 4 - Define scenario using the reusable modules/processes
    Step 5 - Run and check Reports
    Configure virtual users with ramp up
    Step 1 - Define multiple sets of users and assign modules
    Step 2 - Add ramp up time with multiple sets of users
    Virtual Users
    VU Injection Profile
    What is Load Simulation Or Injection Profile
    Adding virtual users to run the test
    Ramp up, Ramp down of virtual users
    Duration of the test
    Design workload models
    In Gatling Script, injection profile of users is created using
    injectOpen() and injectClosed() methods
    Or
    just inject() method in Scala
    nothingFor(5)
    atOnceUsers(5)
    rampUsers(20) during(2)
    rampUsersPerSec(1) to (20) during(5)
    constantUsersPerSec(10) during(10)
    maxduration()
    Closed workload Model - we can control the number of concurrent users
    Open workload Model - we cannot control the number of concurrent users (most websites behave this way)
    Reference - gatling.io/docs/gatling/refer...
    Document - tinyurl.com/GatlingDoc1-Ragha...
    ▬▬▬▬▬▬▬
    Every Like & Subscription gives me great motivation to keep working for you
    You can support my mission for education by sharing this knowledge and helping as many people as you can
    If my work has helped you, consider helping any animal near you, in any way you can
    Never Stop Learning
    Raghav Pal
    ▬▬

КОМЕНТАРІ • 9