for now, i have a maven project in intellij and i run it by the engine of scala from the ui.
how i need to run it batch.
i saw that i need gatling-maven-plugin.
but my intellij cannot find it.
what is the right way to do it?
It’s in central: http://search.maven.org/#search%7Cga%7C1%7Cgatling-maven-plugin
No idea why your Intellij can’t find it.
With the gatling-maven-plugin you will be able to declare what build phase you want to run test from. However the current gatling-maven-plugin appears to be out of date of gatling 2.1.4 as gatling 2.1.4 doesn’t accept the -rbf (request-bodies) argument which causes an error. If you download the Gatling Universal bundle you will get some shell/batch scripts and the root gatling library that will allow you to run the scenarios from the command line.
I hope to have some time today to fork and fix the maven-plugin as we prefer to use this method with jenkins than the jenkins plugin (we save our reports out on a remove server for viewing).
Check the migration guide and you’ll realize the request-bodies folder has been renamed, and so was the option.
My bad, there are 2 gatling-maven plugins (assuming to keep legacy apps running) to which I have the old one installed
pre request-bodies rename (https://github.com/gatling/gatling-maven-plugin)
post request-bodies rename (https://github.com/gatling/gatling-maven)
Thanks for the heads up.
The code was copied into a new project where we merge the maven plugin and the maven archetype.
so why i cannot find it here: https://plugins.jetbrains.com/search/index?pr=idea_ce&search=gatling-maven-plugin
i would like it to be added automatically. not edit the pom file no?
so why i cannot find it here:
https://plugins.jetbrains.com/search/index?pr=idea_ce&search=gatling-maven-plugin
It's not an IntelliJ plugin, it's a maven one!
i would like it to be added automatically. not edit the pom file no?
Of course you have.
ok, still 2.1.4 is not found when i insert this the plugin into my pom file:
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<!-- Default values -->
<!--<configFolder>src/test/resources</configFolder-->
<dataFolder>src/test/resources/data</dataFolder>
<resultsFolder>target/results</resultsFolder>
<requestBodiesFolder>src/test/resources/request-bodies</requestBodiesFolder>
<simulationsFolder>src/test/scala</simulationsFolder>
</configuration>
</execution>
</executions>
</plugin>
When publishing minor versions of Gatling, we do not publish everything, unless it is really needed (e.g. there has been bugfixes).
Since the Maven Plugin did not need fixes recently, the latest Maven Plugin is 2.1.2 :
http://search.maven.org/#search%7Cga%7C1%7CGatling-maven-plugin
Replace 2.1.4 by 2.1.2 for the Maven Plugin and it’ll work
i must have the 2.1.4 because a fix you did and solved.
but anyway even i change it to 2.1.2 it still says:
[ERROR] No plugin found for prefix ‘gatling’ in the current project and in the plugin groups [or
i perform the command mvn gatling:execute. is it right?
i must have the 2.1.4 because a fix you did and solved.
A fix for Gatling itself, quite possibly.But the Maven Plugin is just a way of running Gatling, and you can have the Maven Plugin v2.1.2 and still use Gatling 2.1.4, since the Maven Plugin does not bundle Gatling.
but anyway even i change it to 2.1.2 it still says:
[ERROR] No plugin found for prefix ‘gatling’ in the current project and in the plugin groups [or
Can you share your pom.xml please?
here is my pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gatling</groupId>
<artifactId>gatling</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<scala.version>2.11.4</scala.version>
<encoding>UTF-8</encoding>
<gatling.version>2.1.4</gatling.version>
<scala-maven-plugin.version>3.2.0</scala-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-app</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-recorder</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-app</artifactId>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-recorder</artifactId>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-target:jvm-1.7</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
sorry, i think i solved it.
i didn’t add just this to the pom filein the pluginManagement:
>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>2.1.2</version>
</plugin>
ok so cli is working now perfect.
what i did:
updated the pom file with:
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>2.1.2</version>
</plugin>
in the pluginManagement.
version 2.1.2 and not 2.1.4
adding: