values in a feeder is always the same despite a Repeat-loop

390 views
Skip to first unread message

Magnus Jensen

unread,
Jun 23, 2015, 2:45:21 PM6/23/15
to gat...@googlegroups.com
My scenario does not pick the next value in my feeder file.
It always picks the first value for each repeat in the loop. Why does it not pick the next one for each repeat-call. I can see that 20 https calls are made.


val scnEtikettBestilling = scenario("LabelOrder")

   
.feed(csv(
"data/pdaArticle.csv").circular)
   
.feed(csv(
"data/pdaTestData.csv").circular)
   
.feed(csv(
"data/PdaStoreNames.csv").circular)

   
.exec(flushCookieJar)
   
.exec(flushHttpCache)

   
.exec(http(
"LOGIN")
   
.get(
"/neptune/UI5_RETAIL_APPCACHE?sap-client=300&appcache=HHH")
   
.headers(
headers)
   
.basicAuth(
"${username}","${password}")
   
.check(
status.is(200)))


    .exec(http("LabelgMenuElement")
   
.post(
uri2 + "?ajax_id=GET_CARTS_TOTAL&ajax_applid=UI5_RETAIL_ORDER_LABEL&field_id=00309&ajax_value=undefined")
   
.headers(
headers)

   
.formParam(
"""{"WERKS":"${storenumber}","NAME1":"${storename}"}""", "")
   
.check(
jsonPath("$.modelpageStartData.TOTAL_LISTS").saveAs("total_lists"))
   
.check(
jsonPath("$.modelpageStartData.LIST_ID").saveAs("list_id")))


     
.exec(session => {
       
println((session(
"total_lists").as[String]))
       session
})



.repeat(
20)

 
{

 
exec(http(
"AddArticle")

   
.post(
uri2 + "?ajax_id=GET_ARTICLE_DETAILS&ajax_applid=UI5_RETAIL_ORDER_LABEL&field_id=00055&ajax_value=${art}")
   
.headers(
headers)
   
.formParam(
"""{"WERKS":"${storenumber}","NAME1":"${storename}","LIST_ID":${list_id},"TOTAL_LISTS":"${total_lists}","DEVICE_ID":"win8ff38","HEADER_TEXT":"","HASH_BASED_MESSAGE_AUTHENTICAT":"","ID":"","REVISION":0,"LABEL_TYPE_LOCKED":false,"LABEL_TYPE":"0"}||{}||{}||{}||[{"ID":0,"NAME":"Standard"},{"ID":23,"NAME":"Etikett (11 x 2) Butikkringen"},{"ID":24,"NAME":"Liten etikett (5 x 3) Butikkringen"},{"ID":41,"NAME":"Prislapp (36 x 17)"},{"ID":51,"NAME":"IS prislapp 48 x 28"},{"ID":61,"NAME":"G etikett 72 x 39"},{"ID":301,"NAME":"Etikett 11 x 2 Plenty"},{"ID":321,"NAME":"Neste Stopp prislapp u.pris"},{"ID":325,"NAME":"Prislapp uten pris (11 x 3)"},{"ID":344,"NAME":"Prislapp (rull 25 x 60)"},{"ID":351,"NAME":"ÖoB medium"}]""", "")
   
.basicAuth(
"${username}","${password}"))
 
}

   
.exec(http(
"LOGOUT")
   
.post(
"http://xxx:8300/neptune/native/neptune_login_ping.html?sap-clearsso2")
   
.basicAuth(
"${username}","${password}"))

        setUp
(
scnEtikettBestilling.inject(atOnceUsers(1))).protocols(httpProtocol)
 
}




John Arrowwood

unread,
Jun 23, 2015, 3:05:43 PM6/23/15
to gat...@googlegroups.com
Put the .feed() inside the .repeat { } block.

Magnus Jensen

unread,
Jun 23, 2015, 3:22:58 PM6/23/15
to gat...@googlegroups.com
thanx!
Reply all
Reply to author
Forward
0 new messages