Hi,
I'm using one of the examples from https://github.com/excilys/gatling/wiki/Checks
and I get this error: findAll is not a member, here is my code:
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
class Test extends Simulation {
http("My Request").get("www.google.com")
.check(regex("""http://(.*)/.*"""))
.findAll
.is(List("www.google.com", "www.mysecuredsite.com"))
}
Am I missing something, do I need to import anything else? I tried
importing
import scala.util.matching.Regex
import scala.util.matching.Regex.MatchIterator
but got the same error
Thank You
The apply def (=method) is missing, like in:
https://github.com/excilys/gatling/wiki/First-Steps-with-Gatling#wiki-simulation-class
You should write:
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
class Test extends Simulation {
def apply = {
http(“My Request”).get(“www.google.com”)
.check(regex(""“http://(.)/.”""))
.findAll
.is(List(“www.google.com”, “www.mysecuredsite.com”))
}
}
Cheers,
Steph
2012/5/5 David T <dtishkoff@gmail.com>
Your compilation error is actually that you misplaced some parenthesis: the check method takes a vararg of checks.
http(“My Request”)
.get(“www.google.com”)
.check(
regex(""“http://(.)/.”"")
.findAll
.is(List(“www.google.com”, “www.mysecuredsite.com”))
)
Also, I don’t know if you just copied a part of your structure or really got confused, but in the latter, your simulation class structure is wrong, see https://github.com/excilys/gatling/wiki/First-Steps-with-Gatling#wiki-simulation-class
Cheers,
Stephane
2012/5/5 Stéphane Landelle <slandelle@excilys.com>
Glad to hear.
Have fun!
2012/5/7 David T <dtishkoff@gmail.com>