I am trying to isolate the processes of my tests as outlined in the advanced tutorial but I am having some issues. In particular, the example shows moving each process into its own scala class like so:
import io.gatling.core.Predef._
import io.gatling.core.scenario.Simulation
import io.gatling.http.Predef._
import scala.concurrent.duration._
class SearchSimulation extends Simulation {
object Search {
val search = exec(http("Home") // let's give proper names, as they are displayed in the reports
.get("/"))
.pause(7)
.exec(http("Search")
.get("/computers?f=macbook"))
.pause(2)
.exec(http("Select")
.get("/computers/6"))
.pause(3)
}
}
First, I should say that I am fairly new to Scala so this is likely user error. But, when I attempt to create an object like the one above I get an error that the value "exec" is not found. It is the first line (val search = exec(http("Home")) that is being flagged. I thought maybe there was some import I was missing but after review it does not seem to be the case, or it could be that I am doing the import incorrectly. I also grabbed the source for gatling and reviewed the AdvancedSimulationStep05.scala and it has something very similar. What am I missing?