Created
February 23, 2015 18:32
-
-
Save chbatey/9c5ee580cbae648dd30f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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