Last active
December 10, 2015 20:08
-
-
Save nremond/4486383 to your computer and use it in GitHub Desktop.
Gatling simulation that hightlights the problem with Gatling when using SSL session tracking.
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 basic | |
import com.excilys.ebi.gatling.core.Predef._ | |
import com.excilys.ebi.gatling.http.Predef._ | |
import bootstrap._ | |
class BasicExampleSimulation extends Simulation { | |
val counterFeeder = new Feeder[Int] { | |
private val gen = Stream.from(1).toIterator | |
override def hasNext = true | |
override def next: Map[String, Int] = Map("counter" -> gen.next) | |
} | |
val httpConf = httpConfig.baseURL("https://localhost:8443/ssl-session-tracking") | |
val scn = scenario("SSL issue scenario") | |
.feed(counterFeeder) | |
.exec(http("Root1") | |
.get("/index.jsp").queryParam("s", "${counter}") | |
.check( | |
regex("""s in session = ${counter}""").exists | |
)) | |
.exec(http("Root2") | |
.get("/index.jsp") | |
.check( | |
regex("""s in session = (\d+)""").find.is("${counter}") | |
)) | |
setUp(scn.users(100).ramp(10).protocolConfig(httpConf)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment