Gatling Beginner Tutorial 2 | Maven, Project, Scripts, Execution & Reporting |

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 95

  • @TheRituraj2011
    @TheRituraj2011 Год назад +3

    Thank you Raghav for such a detailed and practical session. You are doing fantastic. When we talk about testing help you always come first in mind. Keep doing

    • @RaghavPal
      @RaghavPal  Год назад +1

      Hi Ritu,
      So happy & humbled to see this

  • @girlfromvalleys
    @girlfromvalleys 2 года назад +1

    Thankyou! It is very helpful 😇

  • @Swapnalipatil-k1q
    @Swapnalipatil-k1q 10 месяцев назад

    thanks for your videos Raghav.. i would like to set-up gatling using gradle. But i am getting multiple issues while doing that. if you have any idea on how to do it can you please quickly help me in this. Thanks!

    • @RaghavPal
      @RaghavPal  10 месяцев назад

      Swapnali
      Please tell me:
      What are the specific error messages or build failures you're seeing? The more details you can provide, the better I can understand the issue.
      What steps have you taken so far to set up Gatling with Gradle?** Sharing your current configuration or code snippets could be helpful.
      What Gatling version are you using? Different versions might have different setup requirements.
      What IDE or environment are you working in?** Knowing your development environment can also help pinpoint potential issues.

  • @nesreenmohd665
    @nesreenmohd665 9 месяцев назад

    Thank you for your videos. Can we use gatling scala to test kafak topics and create a load test for topics and create report for it???

    • @RaghavPal
      @RaghavPal  9 месяцев назад +1

      Nesreen
      Yes, Gatling Scala is a robust tool for testing Kafka topics and creating load tests for them. It enables you to simulate message production and consumption across your Kafka infrastructure, analyze performance metrics, and generate comprehensive reports.
      Here's an overview of the process:
      1. Dependencies:
      First, you need to add the necessary Gatling plugin for Kafka interactions. You can achieve this by including the following dependency in your build.sbt file:
      ```scala
      libraryDependencies += "io.github.gatling" %% "gatling-kafka" % "3.7.1"
      ```
      2. Simulation Scenario:
      Next, define your simulation scenario using Gatling's Scala DSL. This scenario outlines the test steps, including:
      * Producer Simulation:
      * Specifying Kafka brokers and topic details.
      * Generating test messages or reading them from files.
      * Sending messages to the Kafka topic using the `kafka` feeder and `publish` action.
      * Consumer Simulation:
      * Subscribing to the Kafka topic.
      * Receiving and processing messages.
      * Validating message content and processing logic.
      Here's an example snippet demonstrating a basic producer simulation with Gatling-Kafka:
      ```scala
      val simulation = scenario("Kafka Producer Load Test") {
      exec {
      kafka("MyTopic")
      .topic(topic = "test-topic")
      .producer
      .key(StringBody("key_"))
      .value(StringBody("message_"))
      .publish(count = 1000)
      }
      }
      ```
      3. Performance Metrics and Reports:
      Gatling provides rich performance metrics for your Kafka load test. You can monitor details like throughput, message processing time, errors, and resource utilization. It also generates comprehensive reports with visualizations and data tables for a deeper analysis of your test results.
      [Image of Gatling Report]
      Additional Features:
      Gatling offers advanced features like:
      * Custom Assertions: Validate message content and processing logic within your simulations.
      * Distributed Load Testing: Run your tests across multiple machines for large-scale scenarios.
      * Integration with CI/CD pipelines: Automate Kafka load testing within your development workflow.
      By leveraging Gatling's capabilities, you can effectively test your Kafka infrastructure and ensure its resilience under high load. Remember to consider your specific testing needs and customize your simulations accordingly.

    • @nesreenmohd665
      @nesreenmohd665 9 месяцев назад

      @@RaghavPal Thank you very much for your reply and these information.

  • @SunilKarki-s3x
    @SunilKarki-s3x 8 месяцев назад

    Thanks for the great lectures Raghav. can you please share how we can create a maven project of gatling with java and not scala?

    • @RaghavPal
      @RaghavPal  8 месяцев назад

      Sunil
      I will suggest that you clone the Gatling Java official project and use it -
      Java - github.com/gatling/gatling-maven-plugin-demo-java
      Else, to create a project from scratch follow these steps:
      1. Open IntelliJ IDEA:
      - If you haven't already, download and install IntelliJ IDEA on your system.
      2. Create a New Project:
      - Open IntelliJ IDEA.
      - Click on "File" > "New" > "Project...".
      - Choose "Maven" as the project type.
      3. Configure Project Details:
      - Set the Group ID and Artifact ID for your project.
      - Choose the Java version you want to use (e.g., Java 8 or higher).
      4. Add Gatling Dependency:
      - In the `pom.xml` file (Maven configuration), add the Gatling dependency:
      ```xml

      io.gatling.highcharts
      gatling-charts-highcharts
      3.6.1
      test

      ```
      5. Create a Gatling Simulation Class:
      - Create a new Java class (e.g., `MyGatlingSimulation`) in the `src/test/java` directory.
      - Extend the class from `io.gatling.core.scenario.Simulation`.
      - Write your Gatling simulation code in this class.
      6. Run Gatling Tests:
      - Open the terminal in IntelliJ IDEA.
      - Run Gatling tests using the following command:
      ```
      mvn gatling:test
      ```
      7. View Reports:
      - After running the tests, Gatling generates HTML reports in the `target/gatling` directory.
      - Open the HTML report in your browser to view the test results.
      all the best..

    • @SunilKarki-s3x
      @SunilKarki-s3x 8 месяцев назад

      @@RaghavPal Thanks for the guidance, I have a clarification...when we are cloning the mentioned project then we get the same structure as Scala. But, when we are creating from scratch then there are no engine, IDEPathhelper, Recorder objects.
      When we create a new project with Scala then also the structure is same, why it is not there with new project with java?

    • @RaghavPal
      @RaghavPal  8 месяцев назад

      Structure should not be an issue.. also it will be good to clone the project.. to avoid setting up everything yourself

  • @YoungTeamtphcm
    @YoungTeamtphcm Год назад

    Hi Raghav, I'm research about this tool, in this example in video we have just use 1 user, but I want to handle 10 users or many to stress this function. So How can i setup script with this scenario. Thanks for your support

  • @_Homieskitchen.838
    @_Homieskitchen.838 2 года назад +1

    Hi raghav thanku so much for your efforts.I have learned multiple technology and languages through your channel...Can you plz Suggest me like I want to learn selenium with Java .so could you please share the link because I already checked your playlist and I am little confused that's why I am asking to plz help me and thanks once again👍

    • @RaghavPal
      @RaghavPal  2 года назад +2

      Hi Anjali, happy to know this, You can check all links here - automationstepbystep.com/

  • @checkmateatnet
    @checkmateatnet Год назад

    Hi raghav do you have video on how to install scala in eclispe? i have tried multiple times its not working.I am trying to create performance reports with karate framework in eclispe

    • @RaghavPal
      @RaghavPal  Год назад

      Hi, To install Scala in Eclipse, you can use the Scala IDE plugin. Here are the steps to install it:
      Open Eclipse and go to the Help menu.
      Click on "Eclipse Marketplace"
      Search for "Scala IDE" and click on the "Go" button.
      Select the latest version of the plugin and click on the "Install" button.
      Follow the prompts to complete the installation process.
      Restart Eclipse after installation
      Once the plugin is installed, you can create a new Scala project in Eclipse and start writing Scala code

  • @GauravChawla111
    @GauravChawla111 2 года назад

    very good

  • @chandrasekharreddy7449
    @chandrasekharreddy7449 Год назад

    While executing recorder class ,it's showing as
    Recorder is defined as object recorder
    Object recorder extends app
    Why?? Please provide a solution

    • @RaghavPal
      @RaghavPal  Год назад +1

      Hi Chandra
      The error message suggests that the recorder class is defined as an object and is extending the app.
      In Gatling, the Recorder is a tool used for recording HTTP requests and generating Scala code for those requests. It is typically used to create performance test scripts.
      Regarding your error, it is difficult to provide a solution without more context and information. However, one potential cause of the error could be related to how you are trying to execute the recorder class.
      Make sure you have included all the necessary dependencies and have properly configured the recorder before executing it. Also, ensure that the classpath is properly set up to include all the required libraries.
      If you are still encountering issues, I recommend looking at the Gatling documentation or seeking help from the Gatling community.

  • @youngster7350
    @youngster7350 2 года назад

    @
    Automation Step by Step
    I opened the Scala under the project class it shows an error highlighting Http like) how can resolve this?
    when i hover the http .it'sshowsw below the error.
    Incompatible combinations of tabs and spaces in indentation prefixes. Previous indent : 1 tab Latest indent : 12 spaces

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi, I believe some issue with indentation and code formatting, do a right click and format code or use any online formatter

  • @MuhammadUsman-dk4kt
    @MuhammadUsman-dk4kt 9 месяцев назад

    I want to run the tests from command prompt....can you please tell me the steps ?

    • @RaghavPal
      @RaghavPal  9 месяцев назад +1

      Usman
      ## Running Gatling Tests from Command Prompt
      There are two primary ways to run Gatling tests from the command prompt:
      1. Using Maven:
      This is the recommended approach if you're using a Maven-based project.
      Steps:
      1. Open a command prompt in your project directory.
      2. Run the following command:
      ```
      mvn gatling:test [-DsimulationClass=]
      ```
      - Replace `` with the actual name of your Gatling simulation class (usually located in the `src/test/scala/simulations` package).
      - You can add additional options like `-Dduration=60` to specify the test duration in seconds.
      2. Using Gatling Bundle:
      This option is suitable if you're not using Maven or prefer a standalone approach.
      Steps:
      1. Download the Gatling bundle from [gatling.io/open-source/](gatling.io/open-source/).
      2. Extract the downloaded ZIP file to a directory.
      3. Open a command prompt and navigate to the `bin` directory within the extracted folder.
      4. Run the following command:
      ```
      gatling.sh [-simulationClass=] -s
      ```
      - Replace `` and `` with the actual names of your Gatling simulation class and scenario file.
      - You can add additional options like `-es 60` to specify the end time after 60 seconds.
      Additional Tips:
      * Make sure you have compiled your Gatling simulations before running the tests.
      * The command prompt will show the test progress and generate a report upon completion.
      I hope this helps

    • @MuhammadUsman-dk4kt
      @MuhammadUsman-dk4kt 9 месяцев назад

      @@RaghavPal
      Hi Raghav thank you so much for helping.
      You really helped a lot.
      I have 1 more question as you have experienced in Gatling so I want to pass JSON bodies 1 by 1 to my post request for load testing. All JSON files are in my PC. So, earlier when I was running the test there were only 1K files in that particular folder but now there are 16lak files and my execution is starting very slow. can we optimize this ?
      Below is my code that how I am accessing the files from my pc.
      we can connect on a call if it's possible for you.
      // Specify the local directory path where your JSON files are located
      val jsonDirectory = new File("C:\\cygwin64\\home\\Administrator\\cache_files\\cache_files\\US")
      // List all JSON files in the directory
      val xmlFiles = jsonDirectory.listFiles.filter(_.isFile).toList

    • @RaghavPal
      @RaghavPal  9 месяцев назад +1

      Some strategies to optimize your Gatling test for loading 160,000 JSON files. Here are key recommendations:
      1. Leverage Gatling Feeders:
      - Efficient File Reading: Replace `listFiles` with Gatling's `separatedValues` feeder for faster and managed file loading:
      ```scala
      val jsonFeeder = separatedValues("C:\\cygwin64\\home\\Administrator\\cache_files\\cache_files\\US\\data.csv", '#')
      .circular // Loop through files repeatedly
      .queue // Load files as needed, not all at once
      ```
      - CSV File with Paths: Create a CSV file (`data.csv`) listing JSON file paths for the feeder to process.
      2. Parallelize File Reading:
      - Concurrent File Access: Use Gatling's `resources` method for concurrent file loading, distributing load across multiple threads:
      ```scala
      val jsonFiles = resources("C:\\cygwin64\\home\\Administrator\\cache_files\\cache_files\\US\\*.json")
      ```
      3. Employ Selective Reading:
      - Target Specific Files: If possible, narrow down the files to a relevant subset to reduce load:
      ```scala
      val jsonFiles = resources("C:\\cygwin64\\home\\Administrator\\cache_files\\cache_files\\US\\*_specific.json")
      ```
      4. Distribute Load:
      - Multiple Test Machines: If feasible, distribute the load across multiple machines to handle large file sets effectively.
      5. Optimize Hardware and Environment:
      - Upgrade RAM and SSD: Enhanced hardware significantly improves file handling performance.
      - Review File System: Ensure your file system is optimized for handling numerous files.
      - Minimize Background Processes: Terminate unnecessary processes to free up resources.
      Additional Considerations:
      - JSON Size: For extremely large JSON files, consider parsing and extracting relevant data for performance gains.
      - Gatling Configuration: Fine-tune Gatling's settings for optimal resource usage.
      - Logging: Analyze logs to identify bottlenecks and adjust accordingly.
      By incorporating these strategies, you should observe significant performance improvements in your Gatling test when dealing with large numbers of JSON files.

    • @MuhammadUsman-dk4kt
      @MuhammadUsman-dk4kt 9 месяцев назад

      Thank you so much

  • @sameerjoshi1033
    @sameerjoshi1033 2 года назад

    Can we this project setup in Java? since this is available in java, I think we can do it. What are the steps to do in java?

    • @RaghavPal
      @RaghavPal  2 года назад

      Yes, you can, you can select Java while recording and check the script

  • @jheymissonalbuquerque8566
    @jheymissonalbuquerque8566 2 года назад

    Obrigado pelo tutorial!! Me ajudou bastante.

  • @alihamza-eb2yy
    @alihamza-eb2yy 2 года назад

    sir I have a very important question . Do we need to install the Gatling or any other load tester tool installed on Server machine or we can simply install it on our local machine and just recording the scripts and generate report on our own Pc . Please Sir give me answer

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Ali, you can start from your machine, Steps are shown in tutorial

  • @mohiti1
    @mohiti1 2 года назад

    Sir I have 10 years of experience into manual testing...Can I switch to RPA...Actually I only have manual exp into video games testing...I dont know about web testing and Api . What should I do .please guide sir

    • @RaghavPal
      @RaghavPal  2 года назад

      Yes, you can, follow some tutorials and skill up yourself

  • @StoormPL
    @StoormPL 2 года назад

    Nice !

  • @harsimranjitsingh591
    @harsimranjitsingh591 2 года назад

    Thanks Raghav for all you efforts and makings things easy for us.🙂
    Just wondering, In latest Gatling version, We can write the script in JAVA or SCALA (It allows us to select from Drop down either scala or Java : When we use the HAR CONVERTER Option.
    Do I still need to configure the Scala SDK if i am writing script in Java?

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi Harsimranjit, Gatling is itself build on Scala, so we need scala irrespective of the language we use for scripting tests

    • @harsimranjitsingh591
      @harsimranjitsingh591 2 года назад

      @@RaghavPal Thanks a lot Raghav for the advice.

  • @amazonprime9896
    @amazonprime9896 2 года назад

    hii sir i have one dout. while i am running mvn archetype:generate after build sucess in my folder under test folder i have to get resources and scal right but i got java folder how to solve this problem sir can you help me in this ...

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi, pls check the steps from the video and do the same, in case you see similar structure as in the video, should be ok

  • @k.lakshman1919
    @k.lakshman1919 Год назад

    I am getting the following error when click on run engine
    scala: error while loading ElementType,
    class file /modules/java.base/java/lang/annotation/ElementType.class is broken, reading aborted with class java.lang.RuntimeException
    bad constant pool index: 0 at pos: 1220

    • @RaghavPal
      @RaghavPal  Год назад

      Lakshman
      The error message you are seeing indicates that Gatling is trying to load the `ElementType` class from the Java runtime library, but the class file is broken. This can happen for a few reasons, such as if the class file is corrupted or if the Java runtime library is not installed correctly.
      To fix the error, you can try the following:
      1. Make sure that the Java runtime library is installed correctly. You can check this by running the following command:
      ```
      java -version
      ```
      If the Java runtime library is not installed correctly, you can download and install it from the Oracle website.
      2. Delete the `ElementType` class file from the Java runtime library. This will force Gatling to reload the class file from the classpath.
      3. Upgrade to a newer version of Gatling. Gatling 3.5.0 and later versions are not affected by the bug that is causing this error.
      If you are still getting the error after trying the above steps, you can post a question on the Gatling forum or Stack Overflow.
      Here are some additional tips for troubleshooting Gatling errors:
      * Make sure that you are using the correct version of Gatling.
      * Make sure that you are using the correct version of the Java runtime library.
      * Make sure that Gatling has permission to access the classpath.
      * Make sure that Gatling has permission to access the test environment.
      * Check the Gatling logs for more information about the error.
      I hope this helps

    • @k.lakshman1919
      @k.lakshman1919 Год назад

      @@RaghavPal i have installed jkd 21 version before and I faced the above error. Now i installed jdk 17 version the above issue got resolved.

  • @manikantak3341
    @manikantak3341 8 месяцев назад

    I'm using
    Java 8
    gatling-charts-highcharts 3.9.5
    gatling-maven-plugin 4.0.1
    Now I've a HTTPS request when I'm trying to test I'm getting below error
    IllegalArgumentException protocol TLSv1.3 is not supported
    Could u please help me?

    • @RaghavPal
      @RaghavPal  8 месяцев назад

      Mani
      The error message you're encountering indicates that TLSv1.3 is not supported in your current Java environment. Here are some steps you can take to address this issue:
      1. Upgrade Your Java Version:
      - Consider upgrading your Java version to a newer release that supports TLSv1.3. Java 11 or later versions have built-in support for TLSv1.3.
      - Java 8 does not natively support TLSv1.3, so upgrading to a more recent version is recommended.
      2. Check Your API:
      - Ensure that the API you are connecting to actually supports TLSv1.3. If it does not, you may need to negotiate a different TLS version during the handshake.
      3. Configure TLS Version:
      - If you want to force your Java client to use TLSv1.2 instead of TLSv1.3, you can set the `jdk.tls.client.protocols` system property. For example:
      ```
      java -Djdk.tls.client.protocols=TLSv1.2 -jar your-application.jar
      ```
      - This will make your client advertise TLS version 1.2 only, even if the server supports TLSv1.3.
      Remember to verify that your API supports the chosen TLS version. If you encounter any issues, ensure that your Java environment is configured correctly. Upgrading to a more recent Java version is generally recommended for better security and compatibility.
      ..

  • @aruns5896
    @aruns5896 2 года назад

    Hi Ragav, Thanks for the videos,Really Nice . Getting Issue that ,executed recorder.run and gatling screen opened.When I click start button , Package getting highlighted (com.gatling.tests)

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Arun, will need to check on this, Try again from Step 1

  • @varalikaagarwal8615
    @varalikaagarwal8615 2 года назад

    Hello Raghav
    I am getting this error while running the Engine file in IntelliJ IDE "scalac: error while loading GatlingRecorder$,
    ZipFile invalid LOC header (bad signature).

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Varalika, it may due to dependencies, Pls check - groups.google.com/g/gatling/c/uPVfUO8Tvxc

  • @monikaverma4970
    @monikaverma4970 2 года назад

    Hi Raghav ,
    While running engine project , I am getting ‘value gatling is not a member of io ‘ . Could you please help here?

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Monika, this can help groups.google.com/d/topic/gatling/uv4tJFOOJmw
      stackoverflow.com/questions/57163603/object-gatling-is-not-a-member-of-package-io

  • @mohanrajjayaram8098
    @mohanrajjayaram8098 2 года назад

    Hi Ragav, actually this question is not related gatline
    I was trying to find way of sending email of allure report from Jenkins but I could not find anything so can you guide me to the right direction in how to do this
    Thanks in advance

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Mohan, I have not tried it and I believe you may already have checked online, I can just say that try searching some more online examples or create a question on stackoverflow

  • @Lees2810
    @Lees2810 11 месяцев назад

    I am getting this error while running the Engine in IDE.
    " scala: error while loading ElementType,
    class file /modules/java.base/java/lang/annotation/ElementType.class is broken, reading aborted with class java.lang.RuntimeException
    bad constant pool index: 0 at pos: 1220 "
    Could you please help with this ?

    • @RaghavPal
      @RaghavPal  11 месяцев назад

      Suganthi
      I need more details to troubleshoot this. Is this related to Postman. What exactly did you do

  • @hemlatahemlata6374
    @hemlatahemlata6374 2 года назад

    after hitting mvn archetype:generate , it stucked in "Generating project in Interactive mode..."
    it took 1/2 hour and at the last i had to came out from terminal.
    sir, can you tell me why its happening and whats the solution

    • @RaghavPal
      @RaghavPal  2 года назад

      will need to check logs Hemlata, can try using a diff ver of maven stackoverflow.com/questions/31453116/maven-project-creation-command-stuck

  • @harshitpandey4839
    @harshitpandey4839 Год назад

    Hi Raghav,
    I am getting error while running Engine class
    scalac: error while loading package, class file '/Users/hapandey/.m2/repository/io/gatling/gatling-app/3.6.1/gatling-app-3.6.1.jar(io/gatling/app/package.class)' is broken
    (class java.lang.RuntimeException/error reading Scala signature of package.class: Scala signature package has wrong version
    expected: 5.0
    found: 5.2 in package.class)

  • @venkatsubbu1572
    @venkatsubbu1572 2 года назад

    Hello Sir, Getting an error while running Engine. Error: Could not find or load main class Engine

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi Venkat, this can help stackoverflow.com/questions/58169848/gatling-error-could-not-find-or-load-main-class-engine

    • @venkatsubbu1572
      @venkatsubbu1572 2 года назад

      @@RaghavPal Thank you Raghav. I have used few references from the above link and finally got the proper output.

  • @aruns5896
    @aruns5896 2 года назад

    Hi Ragav, Thanks for the videos,Really Nice ...Simulation script is not running . Send a mail . Thanks

    • @RaghavPal
      @RaghavPal  2 года назад

      will need to check the error and logs

  • @bharathig2872
    @bharathig2872 2 года назад

    Hi Raghav, after seeing this video when Iam trying to add the 'setup scala sdk' when selecting the scala folder I am getting error like this 'Not Found : scala-compiler*.jar, scala-reflect*.jar', because of this error Iam no able to setup scala sdk in intelliJ, what would be reason for this? and solution please!!!

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Bharathi, Have you installed scala on your system, Pls check

    • @tranhabaongoc
      @tranhabaongoc 2 года назад

      @@RaghavPal I have the same issue with Bharathi, I opened cmd and type 'scala -version' to check. Looks like I've already installed scala on my system: 'Scala code runner version 3.1.3 -- Copyright 2002-2022, LAMP/EPFL'

  • @sohelshaik7127
    @sohelshaik7127 2 года назад

    Sir, intellij asking for credentials....🙄🙄🙄

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Sohel, did you get the community edition, Pls check the documentation too, just in case something is changed

  • @keneniasbethuelperezbetanz4713
    @keneniasbethuelperezbetanz4713 2 года назад

    Buenas tardes: Tengo una duda , hice la compilacion y me salen estos errores:
    Error:(4, 8) Engine is already defined as object Engine
    object Engine extends App {
    Error:(3, 8) IDEPathHelper is already defined as object IDEPathHelper
    object IDEPathHelper {
    Error:(4, 8) Recorder is already defined as object Recorder
    object Recorder extends App {
    no se cual es el error , si me podrias ayudar por favor

    • @RaghavPal
      @RaghavPal  2 года назад

      Ndaipóri seguroiterei, oikotevêta ojesareko ko'ã mba'ére

  • @Str_DegenJ
    @Str_DegenJ 2 года назад

    We need video for how to create Crypto currency price bot in Discord

    • @RaghavPal
      @RaghavPal  2 года назад

      I have not checked on that

  • @ishanpal9779
    @ishanpal9779 2 года назад

    👌

  • @JaySinhaNZ
    @JaySinhaNZ 2 года назад

    See tutorial 3. DO NOT USE SCALA 3.X version

  • @priyankraheja1593
    @priyankraheja1593 Год назад

    sir when i am typing gatling after typing mvn archetype:generate, I am getting this error:
    Your filter doesn't match any archetype (hint: enter to return to initial list)
    Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : gatling
    Choose archetype:
    I am only getting these options:
    1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An archetype which contains a sample archetype.)
    2: internal -> org.apache.maven.archetypes:maven-archetype-j2ee-simple (An archetype which contains a simplifed sample J2EE application.)
    3: internal -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
    4: internal -> org.apache.maven.archetypes:maven-archetype-plugin-site (An archetype which contains a sample Maven plugin site.
    This archetype can be layered upon an existing Maven plugin project.)
    5: internal -> org.apache.maven.archetypes:maven-archetype-portlet (An archetype which contains a sample JSR-268 Portlet.)
    6: internal -> org.apache.maven.archetypes:maven-archetype-profiles ()
    7: internal -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
    8: internal -> org.apache.maven.archetypes:maven-archetype-site (An archetype which contains a sample Maven site which demonstrates
    some of the supported document types like APT, XDoc, and FML and demonstrates how
    to i18n your site. This archetype can be layered upon an existing Maven project.)
    9: internal -> org.apache.maven.archetypes:maven-archetype-site-simple (An archetype which contains a sample Maven site.)
    10: internal -> org.apache.maven.archetypes:maven-archetype-webapp (An archetype which contains a sample Maven Webapp project.)
    any help sir?
    I had installed maven long back and gatling I installed few days back
    I am getting this warning: [WARNING] No archetype found in remote catalog.

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Priyanka
      The error you are getting is because the Gatling archetype is not installed in your local Maven repository. You can install the Gatling archetype by running the following command:
      mvn install:install-file -Dfile=gatling-maven-archetype-x.y.z-SNAPSHOT.jar -DgroupId=io.gatling -DartifactId=gatling-maven-archetype -Dversion=x.y.z-SNAPSHOT -Dpackaging=jar
      Once you have installed the Gatling archetype, you should be able to create a new Gatling project by running the following command:
      mvn archetype:generate -DarchetypeGroupId=io.gatling -DarchetypeArtifactId=gatling-maven-archetype -DarchetypeVersion=x.y.z-SNAPSHOT
      The `-DarchetypeVersion` parameter is optional, and you can specify the latest version of the Gatling archetype if you want.
      The warning message you are getting is because the remote Maven repository does not contain the Gatling archetype. This is not a problem, as you can install the archetype locally as shown above.
      I hope this helps

    • @priyankraheja1593
      @priyankraheja1593 Год назад

      @@RaghavPal thanks, but I cloned a sample maven+Scala repo and it worked
      I will try this as well

  • @prajaktavarnekar1922
    @prajaktavarnekar1922 2 года назад

    Mygatling projects is already defined as package com.prajgatling.test.mygatlingprojects getting this error and not able to compile the script please help

    • @RaghavPal
      @RaghavPal  2 года назад

      hi Prajakta, will need more details to troubleshoot

    • @prajaktavarnekar1922
      @prajaktavarnekar1922 2 года назад

      I have recorderd one simulation under package (com.gatling.tests).when I record another simulation under same package it gives error as com. Gatling.tests is already defined as package.please help with this. Thank u so much for your tutorials.its working very fine..👍👍

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Prajakta, the class name should be different in the same package

    • @prajaktavarnekar1922
      @prajaktavarnekar1922 2 года назад

      @@RaghavPal Ok sir.I tried it its working now.thank u so much👍

  • @jani007-x4k
    @jani007-x4k 7 месяцев назад

    👌

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      thanks for watching