Each user has its own session (including cookies, saved values). repeat in a scenario will reuse these values for each iteration, so to have independent iterations you'll need new users.
- Injection allows you to specify users per/second (optionally ramped, and over a duration).
- Can also specify a fixed number of
atOnceUsers, but they'll end once their scenario ends.
- Can also specify a fixed number of
- Can Throttle users to a max requests/second (for a duration), but that includes all requests (including
silentones).- You'll still need to carefully specify the number of injected users (if too high, then you'll get too many requests from the first step in a scenario).
Combine common and specific headers with ++ with 2 maps of headers:
val commonHeaders = Map("X-CDB-CLIENT-ID" -> cfg.getString("gateway.headers.client-id"), ...)
protected val mediencenterHeaders: Map[String, String] = Map("X-CDB-USER-TOKEN"->cfg.getString("gateway.token.user")) ++ commonHeadersUses CSSelly, which is an implementation of the W3C Selectors Level 3 specification
.check(css("html:root > body.purchase").exists .protocols(HttpConfig.httpConf.inferHtmlResources(WhiteList(".*")))Uses Jodd Lagarto Node objects
Extract form inputs (to be resubmitted later):
.check(css("""div.myform input""").ofType[Node].findAll
.transform(inputNodes => inputNodes.map(n => (n.getAttribute("name"), n.getAttribute("value"))))
.saveAs("purchaseForm")))
// ...
.exec(http("Make purchase")
.formParamSeq("${purchaseForm}")