Created
August 30, 2012 20:12
-
-
Save nremond/3539727 to your computer and use it in GitHub Desktop.
Gatling simulation that breaks Netty 3.5.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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