Permalink
Browse files

Update to gatling 1.4.1-SNAPSHOT. Changed project test dependencies t…

…o include gatling until I can get gatling-maven-plugin configured properly.
  • Loading branch information...
1 parent fe59cd8 commit ca3a136c668d0879882e479044b6235b98fe6d6a @skuenzli committed Dec 30, 2012
View
@@ -14,7 +14,8 @@
<roo.version>1.2.1.RELEASE</roo.version>
<slf4j.version>1.6.4</slf4j.version>
<spring.version>3.1.0.RELEASE</spring.version>
- <gatling.version>1.3.4</gatling.version>
+ <gatling.version>1.4.1-SNAPSHOT</gatling.version>
+ <joda-convert.version>1.2</joda-convert.version>
</properties>
<repositories>
<repository>
@@ -60,9 +61,9 @@
<url>http://repository.excilys.com/content/groups/public</url>
</pluginRepository>
<pluginRepository>
- <id>qualimente-snapshot</id>
- <name>QualiMente Snapshot Repository</name>
- <url>http://repository-qualimente.forge.cloudbees.com/snapshot/</url>
+ <id>skuenzli-snapshot</id>
+ <name>skuenzli Snapshot Repository</name>
+ <url>http://repository-skuenzli.forge.cloudbees.com/snapshot/</url>
<releases>
<enabled>false</enabled>
</releases>
@@ -307,7 +308,8 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
- <version>1.6</version>
+ <!--<version>1.6</version>-->
+ <version>2.1</version> <!-- 2.1 is required by gatling -->
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
@@ -325,10 +327,43 @@
<artifactId>tiles-jsp</artifactId>
<version>2.2.2</version>
</dependency>
+
+ <!-- gatling dependencies that shouldn't have to be here -->
+ <dependency>
+ <groupId>com.excilys.ebi.gatling</groupId>
+ <artifactId>gatling-core</artifactId>
+ <version>${gatling.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>com.excilys.ebi.gatling</groupId>
<artifactId>gatling-http</artifactId>
<version>${gatling.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling</groupId>
+ <artifactId>gatling-app</artifactId>
+ <version>${gatling.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling</groupId>
+ <artifactId>gatling-charts</artifactId>
+ <version>${gatling.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling.highcharts</groupId>
+ <artifactId>gatling-charts-highcharts</artifactId>
+ <version>${gatling.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.joda</groupId>
+ <artifactId>joda-convert</artifactId>
+ <version>${joda-convert.version}</version>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -536,9 +571,19 @@
</execution>
</executions>
<dependencies>
- <dependency>
- <groupId>com.excilys.ebi.gatling.highcharts</groupId>
- <artifactId>gatling-charts-highcharts</artifactId>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling</groupId>
+ <artifactId>gatling-app</artifactId>
+ <version>${gatling.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling</groupId>
+ <artifactId>gatling-charts</artifactId>
+ <version>${gatling.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.excilys.ebi.gatling.highcharts</groupId>
+ <artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
</dependency>
</dependencies>
@@ -2,11 +2,10 @@ import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import akka.util.duration._
import com.ning.http.client.{Response, Request}
+import bootstrap._
class OutstandingRequestLimitingFilterSimulation extends Simulation {
- def apply = {
-
val urlBase = "http://localhost:8080"
val NUM_SAMPLES = 100
@@ -20,16 +19,14 @@ class OutstandingRequestLimitingFilterSimulation extends Simulation {
val setupScenario = scenario("Setup")
.repeat(NUM_SAMPLES) {
- chain
- .exec(
+ exec(
http("examples - create")
.post("/sample-webapp/examples/")
.headers(StandardHeaders.JSON)
- .body("{}")
- )
+ .body("{}"))
}
- val randomIntegerFeeder = new Feeder {
+ val randomIntegerFeeder = new Feeder[String] {
import scala.util.Random
@@ -45,9 +42,8 @@ class OutstandingRequestLimitingFilterSimulation extends Simulation {
val expectedStatuses: List[Int] = List(200, 503)
val overloadScenario = scenario("Request overload")
- .loop(
- chain
- .exec(
+ .during(60 seconds) {
+ exec(
http("homepage")
.get("/sample-webapp/")
.headers(StandardHeaders.HTML)
@@ -62,24 +58,20 @@ class OutstandingRequestLimitingFilterSimulation extends Simulation {
.feed(randomIntegerFeeder)
- .loop(
- chain
- .exec(
+ .repeat(3){
+ exec(
http("examples - get")
.get("/sample-webapp/examples/${randomInt}")
.headers(StandardHeaders.JSON)
.check(status.in(expectedStatuses))
.check(responseTimeInMillis.lessThan(100))
)
- ).times(3)
-
+ }
.pauseExp(100 milliseconds)
+ }
- ).during(60, SECONDS)
-
- List(
- setupScenario.configure.users(1).protocolConfig(httpConf)
- , overloadScenario.configure.users(100).ramp(10).protocolConfig(httpConf).delay(10, SECONDS)
+ setUp(
+ setupScenario.users(1).protocolConfig(httpConf)
+ , overloadScenario.delay(10 seconds).users(100).ramp(10).protocolConfig(httpConf)
)
- }
}

0 comments on commit ca3a136

Please sign in to comment.