Created
July 4, 2012 11:12
-
-
Save nremond/3046804 to your computer and use it in GitHub Desktop.
Gatling : simulation w/ 2 scenarii
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._ | |
class BasicExampleSimulation extends Simulation { | |
def apply = { | |
val httpConf = httpConfig | |
.baseURL("http://localhost:5000") | |
val scn = scenario("Rock my server") | |
.exec( | |
http("get_root") | |
.get("/") | |
.check(status.is(200)) | |
) | |
.exec( | |
http("head_hello") | |
.head("/hello") | |
.check(status.is(200)) | |
) | |
val scn2 = scenario("Serve me cookies") | |
.exec( | |
http("get_foo") | |
.head("/foo") | |
.check(status.is(200)) | |
) | |
.exec( | |
http("get_foo_bar") | |
.head("/foo/bar") | |
.check(status.is(200)) | |
) | |
List( | |
scn.configure.users(20).ramp(20).protocolConfig(httpConf), | |
scn2.configure.users(20).ramp(20).protocolConfig(httpConf) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment