Hi Henry,
I did find a stupid mistake (did not defined two values in the right order, causing a NPE on old syntax):
https://github.com/excilys/gatling/issues/735
This issue only happens with the deprecated syntax:
https://github.com/excilys/gatling/wiki/Migrating#wiki-1.3.0
With #735 fixed, I was able to run you Simulation, both when located in standard directory, or placed outside.
Here’s your updated Simulation.
Let me know if it works for you.
package com.axway.d2d
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import akka.util.duration._
import bootstrap._
class BasicPerfWebApp extends Simulation {
def apply = {
val extUsers = Integer.getInteger(“users”, 1)
val extRampup = Integer.getInteger(“rampup”, 0).toLong
val extPause = Integer.getInteger(“pause”, 1).toLong
val extLoop = Integer.getInteger(“loop”, 1)
var extHost = System.getProperty(“host”)
if (extHost == null)
extHost = “myrepo”
val extPort = Integer.getInteger(“port”, 80)
var extBaseUrl = “”
if (extPort == 443)
extBaseUrl = “https://” + extHost
else {
extBaseUrl = “http://” + extHost
if (extPort != 80)
extBaseUrl = extBaseUrl + “:” + extPort
}
var extWebapp = System.getProperty(“webapp”)
if (extWebapp == null)
extWebapp = “”
val httpConf = httpConfig
.baseURL(extBaseUrl)
.acceptHeader(“text/html, image/gif, image/jpeg, *; q=.2, /; q=.2”)
.acceptEncodingHeader(“gzip”)
.hostHeader(extHost)
.userAgentHeader(“Apache-Maven/3.0.4 (Java 1.6.0-34; Mac OS X 10.7.4)”)
val headers_1 = Map(
“Pragma” → “”“no-cache”"")
val chain_0 = exec(
http(“request_” + extPause + “ms”)
.get(extWebapp + “/basic-perf/PerfMeter?waittime=” + extPause *
1000 + “&responsesize=1024”)
.headers(headers_1))
val scn = scenario(“basic-perf-webapp”)
.repeat(extLoop) {
chain_0
}
List(scn.configure.users(extUsers).ramp(extRampup).protocolConfig(httpConf))
}
}