Skip to content

Instantly share code, notes, and snippets.

@nremond
Created July 4, 2012 11:12
Show Gist options
  • Save nremond/3046804 to your computer and use it in GitHub Desktop.
Save nremond/3046804 to your computer and use it in GitHub Desktop.
Gatling : simulation w/ 2 scenarii
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