Skip to content

Instantly share code, notes, and snippets.

@nremond
Created August 30, 2012 20:12
Show Gist options
  • Save nremond/3539727 to your computer and use it in GitHub Desktop.
Save nremond/3539727 to your computer and use it in GitHub Desktop.
Gatling simulation that breaks Netty 3.5.6
package computerdatabase
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
class BasicSimulation extends Simulation {
def apply = {
val urlBase = "http://computer-database.herokuapp.com"
val httpConf = httpConfig
.baseURL(urlBase)
val scn
= scenario("TODO")
.exec(
http("Index")
.get("/")
.check(
status.is(200),
css("head title").is("Computers database"),
currentLocation.is(urlBase + "/computers")
)
)
.exec(
http("Apple computers")
.get("/computers?f=apple")
.check(
status.is(200),
regex("""(?s)<a href="([^"]+)">Apple Lisa</a>""").find.saveAs("appleLisaLocation")
)
)
.exec(
http("Apple Lisa")
.get("${appleLisaLocation}")
.check(
status.is(200),
css("#name", "value").is("Apple Lisa")
)
)
List(scn.configure.users(4000).ramp(60).protocolConfig(httpConf))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment