Skip to content

Instantly share code, notes, and snippets.

@chbatey
Created February 23, 2015 18:32
Show Gist options
  • Save chbatey/9c5ee580cbae648dd30f to your computer and use it in GitHub Desktop.
Save chbatey/9c5ee580cbae648dd30f to your computer and use it in GitHub Desktop.
class BasicSimulation extends Simulation {
val app: ConfigurableApplicationContext = SpringApplication.run(classOf[Application])
Runtime.getRuntime.addShutdownHook(new Thread() {
override def run(): Unit = app.stop()
})
val httpConf = http
.baseURL("http://localhost:8080")
.doNotTrackHeader("1")
val scn = scenario("Create Auction") // feature is not really implemented yet
.repeat(100) {
exec(http("request_1").post("/api/auction").basicAuth("chris", "password")).pause(10 milliseconds)
}
setUp(
scn.inject(atOnceUsers(1))
).protocols(httpConf)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment