Hello
Assume I have scenario like this:
var index = 1
val scn3 = scenario(“test”)
.exec(jsfGet(“r1: load test”, “/test.xhtml”))
.exec(http(“r2: post id”)
.post(“/test.xhtml”)
.param(“javax.faces.partial.ajax”, “true”)
.param(“javax.faces.source”, “frm:btn”)
.param(“javax.faces.partial.execute”, “@all”)
.param(“frm:btn”, “frm:btn”)
.param(“frm”, “frm”)
.param(“frm:input”, “test-id-” + index) // <---------- line (1)
.param(“javax.faces.ViewState”, “${viewState}”)
)
.exec(http(“r3: show id”).get(“/test2.xhtml”).check(regex(“”“test-id-13"”").saveAs(“allPage”))) // <— line (2)
In line (1) How do I make index variable to increment for each user? I need each user to have his unique id.
In line (2) Right now I am testing for number 13, how do I test for concrete number for my user which is stored in variable index?
Also could anyone please explain to me why do use 3 quotation marks with regex? Why not simple “13”?
Many thanks in advance.
MM