I have just installed gatling 1.5.6 and tried using the recorder, upon running the generated code I have encountered an error. See code and error below… Do I need to install anything before using gatling?
please see the code below:
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.HeaderNames
class RecordedSimulation extends Simulation {
val httpConf = httpConfig
.baseURL(“http://10.23.22.186:8080”)
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”)
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“en-US,en;q=0.5”)
.connection(“keep-alive”)
.userAgentHeader(“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0”)
val scn = scenario(“Scenario Name”)
.exec(http(“request_1”)
.get("/")
.queryParam(""“login”"", “”“user1"”")
)
setUp(scn.users(1).protocolConfig(httpConf))
}
Here is the error encountered:
10:46:27.615 [ERROR] c.e.e.g.a.ZincCompiler$ - /home/genetan/Downloads/gatling-charts-highcharts-1.5.6/user-files/simulations/RecordedSimulation.scala:3: object gatling is not a member of package io
10:46:27.619 [ERROR] c.e.e.g.a.ZincCompiler$ - import io.gatling.core.Predef._
10:46:27.620 [ERROR] c.e.e.g.a.ZincCompiler$ - ^
10:46:33.173 [ERROR] c.e.e.g.a.ZincCompiler$ - /home/genetan/Downloads/gatling-charts-highcharts-1.5.6/user-files/simulations/sample/RecordedSimulation.scala:5: object gatling is not a member of package io
10:46:33.174 [ERROR] c.e.e.g.a.ZincCompiler$ - import io.gatling.core.Predef._
10:46:33.174 [ERROR] c.e.e.g.a.ZincCompiler$ - ^
10:46:33.246 [ERROR] c.e.e.g.a.ZincCompiler$ - two errors found
Exception in thread “main” Compilation failed
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:76)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
at sbt.inc.Incremental$.cycle(Incremental.scala:52)
at sbt.inc.Incremental$.compile(Incremental.scala:29)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:158)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:142)
at com.excilys.ebi.gatling.app.ZincCompiler$.apply(ZincCompiler.scala:104)
at com.excilys.ebi.gatling.app.SimulationClassLoader$.fromSourcesDirectory(SimulationClassLoader.scala:34)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$12.apply(Gatling.scala:89)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$12.apply(Gatling.scala:89)
at scala.Option.getOrElse(Option.scala:108)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:89)
at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:54)
at com.excilys.ebi.gatling.app.Gatling$.runGatling(Gatling.scala:74)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:49)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)