Skip to content

Instantly share code, notes, and snippets.

@aludwiko
Created September 29, 2020 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aludwiko/1e114f7d5896adb54b839323d9d24791 to your computer and use it in GitHub Desktop.
Save aludwiko/1e114f7d5896adb54b839323d9d24791 to your computer and use it in GitHub Desktop.
val scn =
scenario("Example scenario")
.exec(http("go to main page").get("/"))
.exec(http("find computer").get("/computers?f=macbook"))
.exec(http("edit computer").get("/computers/6"))
.exec(http("go to main page").get("/"))
.repeat(4, "page") {
exec(http("go to page").get("/computers?p=${page}"))
}
.exec(http("go to create new computer page").get("/computers/new"))
.exec(
http("create new computer")
.post("/computers")
.formParam("name", "Beautiful Computer")
.formParam("introduced", "2012-05-30")
.formParam("discontinued", "")
.formParam("company", "37")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment