Skip to content

Commit

Permalink
Merge pull request #15 from cchesser/GatlingPom
Browse files Browse the repository at this point in the history
Moved plugins and dependency declarations into parent pom
  • Loading branch information
AnEmortalKid authored Jun 9, 2018
2 parents e02cb43 + 7dcea73 commit f581d1d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 44 deletions.
39 changes: 0 additions & 39 deletions java-perf-workshop-tester/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,6 @@
<encoding>UTF-8</encoding>
</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>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
Expand All @@ -62,20 +37,6 @@

<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>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
Expand Down
10 changes: 8 additions & 2 deletions part_2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,17 @@ loadtest -n 1000 -c 15 "http://localhost:8080/search?q=a"

Alternatively, you can use [gatling](https://gatling.io/) (a performance library with a scala dsl ).

Navigate to the `java-perf-workshop-tester` directory and run `mvn gatling:test`. This should launch the `WorkshopSimulation`.
:warning: **This should be run from the `java-perf-workshop-tester` directory**

This should launch the `WorkshopSimulation`.

```bash
mvn gatling:test
```

Sample output while running:
```bash
$ mvn gatling:test
[~/java-perf-workshop/java-perf-workshop-tester]$ mvn gatling:test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
Expand Down
55 changes: 52 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@

<!-- tester dependencies -->
<gatling.version>2.3.0</gatling.version>
<scala.version>2.12.3</scala.version>

<!-- plugin versions -->
<scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
<gatling-maven-plugin.version>2.2.4</gatling-maven-plugin.version>
<scala.version>2.12.3</scala.version>
</properties>
<scm>
<connection>${scm.connection}</connection>
Expand All @@ -44,6 +46,15 @@
</roles>
<timezone>-6</timezone>
</developer>
<developer>
<id>AnEmortalKid</id>
<name>Jan Monterrubio</name>
<email>[email protected]</email>
<url>http://github.com/anemortalkid</url>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<modules>
<module>java-perf-workshop-server</module>
Expand Down Expand Up @@ -106,14 +117,52 @@
<artifactId>junit-dep</artifactId>
<version>4.10</version>
</dependency>
<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>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
Expand All @@ -123,4 +172,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

0 comments on commit f581d1d

Please sign in to comment.