Gatling Maven Project Setup Demo | Command Line Runs

Поділитися
Вставка
  • Опубліковано 13 бер 2024
  • All Free Tutorials 🟢 AutomationStepByStep.com/
    How to setup maven project (java & scala)
    How to run maven commands
    How to run specific test simulation
    How to run multiple test simulation
    Gatling Maven Project Setup
    Step 1 - Check Prerequisites
    java -version
    mvn -version
    Step 2 - On IntelliJ IDE Go to File > New > Project from Version Control
    Paste the repository URL
    Java - github.com/gatling/gatling-ma...
    Scala - github.com/gatling/gatling-ma...
    Step 3 - Select local folder, Click Clone
    To view all dependencies goto File > View > Tool Windows > Maven
    For Scala project:
    scala -version (not needed if scala plugin added on IntelliJ IDE)
    check scala plugin is added in the IDE (File - Settings - Plugins)
    can add scala in Project Libraries (File - Project Structure - Global Libraries - Scala)
    In case the scala and resources folder not already marked
    Rt click on scala folder > Mark Directory as > Test Sources root
    Rt click on resources folder > Mark Directory as > Test Resources root
    Step 4 - Open command line and goto the location of project folder
    Try these commands:
    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 mvn clean gatling:test
    Add in pom.xml
    <configuration>
    <runMultipleSimulations>true</runMultipleSimulations>
    </configuration>
    Ref:
    gatling.io/2023/11/migrate-to...
    gatling.io/docs/gatling/refer...
    ▬▬▬▬▬▬▬
    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
    ---
    How to run Gatling from command line
    How to run multiple simulations in Gatling from commandline
    Gatling maven project with commands

КОМЕНТАРІ • 2

  • @sonalahluwalia
    @sonalahluwalia 2 місяці тому

    Hi Raghav.
    I have another query...please help me out.
    How to do LLM testing.

    • @RaghavPal
      @RaghavPal  2 місяці тому +1

      Sonal
      LLM testing stands for Load, Latency, and Memory testing. Let's break down each component:
      1. Load Testing:
      - Purpose: Load testing evaluates how well a system performs under expected and peak loads.
      - Process:
      - Identify critical scenarios (e.g., user registration, checkout process).
      - Create test scripts that simulate user interactions (using tools like JMeter, Gatling, or custom scripts).
      - Gradually increase the load (number of concurrent users or requests) to observe system behavior.
      - Monitor response times, resource utilization, and errors.
      - Analyze bottlenecks and optimize system components.
      2. Latency Testing:
      - Purpose: Latency testing assesses the delay between sending a request and receiving a response.
      - Process:
      - Measure the time taken for various operations (e.g., database queries, API calls, page rendering).
      - Use tools like Ping, Traceroute, or specialized latency measurement tools.
      - Set acceptable latency thresholds based on user expectations.
      - Investigate high latency areas and optimize them.
      3. Memory Testing:
      - Purpose: Memory testing ensures that an application manages memory efficiently.
      - Process:
      - Monitor memory usage during different scenarios (e.g., login, data processing).
      - Use tools like Valgrind, JConsole, or built-in profilers.
      - Check for memory leaks (unreleased memory) and excessive memory consumption.
      - Optimize code, release unused resources, and manage memory effectively.
      4. Integration with Performance Testing:
      - LLM testing often integrates with overall performance testing:
      - Performance Testing: Includes load, stress, scalability, and endurance testing.
      - LLM Testing: Focuses on specific aspects related to load, latency, and memory.
      - Together, they provide a comprehensive view of system performance.
      Remember, effective LLM testing requires a combination of tools, monitoring, and analysis. Start by understanding your application's requirements and user expectations, and tailor your testing accordingly.
      all the best..