I am trying to perform a load testing with gradle-gattling, below are my build.gradle
and my BasicSimulation.scala
plugins {
id "com.github.lkishalmi.gatling" version "3.0.2"
}
repositories {
mavenCentral()
}
apply plugin: 'scala'
dependencies {
testCompile 'junit:junit:4.12'
compile 'org.scala-lang:scala-library:2.11.8'
}
gatling {
simulations = {
include "**/predictors/*.scala"
}
}
gatlingRun {
systemProperties 'endpoint': "${endpoint}"
}
I put the BasicSimulation.scala in the src/gatling/predictors
folder.
package predictors
import io.gatling.http.Predef._
import io.gatling.core.Predef._
class BasicSimulation extends Simulation {
val httpConf = http.baseURL("http://localhost:8000/")
val scn = scenario("Basic Simulation")
.exec(http("request_1")
.get("api/chemocare/gatling/"))
.pause(5)
setUp(
scn.inject(atOnceUsers(80))
).protocols(httpConf)
}
I set up my rest-api and test it with postman. It works fine.
However, when I run gradlew gatlingRun
, it seems like none of the test is executed and no report is generated. I got this message instead:
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
How do I execute and register the test?
src/gatling/simulations
with a closure that includes every file with extension.scala
? – Ridgleasrc/gatling/simulations
is the base path and everyinclude
is evaluated starting from this base path. – RidgleaCaused by: java.lang.RuntimeException: Some simulations failed : BasicSimulation
. I can work from that. Thanks – Saithsrc/gatling/scala
andsrc/gatling/resources
– Ukrainian