In my test plan I have 2 endpoints bid and win. And if bid endpoint return status 200 (it can also return 204, but I need only 200 so I can't use ${JMeterThread.last_sample_ok}) I need to run win endpoint.
I did:
create defined variable
STATUS_OKCreate regular expressions extractor under
bidrequest to get response code
:Add
If controllerand insertwinrequest under that controller
:
But if controller condition not working, Jmeter never run win request.
Any idea why it's not working? or maybe have I can debug it? I would be grateful for any help!!!
Updated including test plan structure
:
- bid requests - is CSV Data set config wit random jsons for each bid request (did like mentioned here)
- thread - it's a thread with 200 users and 1 loop
- bid - post request, for body I'm using one of json files
${__FileToString(/home/user/Downloads/jmeter/jsons/${__eval(${JSON_FILE})}.txt,,)}. Also bid request include currency, bidid etc. it's Json extractors, I'm using that data to generate correct win URL for each bid. - if bid made - if controller discussed here
- win - get request, where URL queries are different depends on bid response (using Json extractors). Url looks like:
win?auctionId=${AUCTIONID}&bidId=${BIDID}&impId=${IMPRESSIONID}&seatId=${SEAT}&price=${__javaScript((Math.random()* (4 - 1)+1).toFixed(4);)}&cur=${CUR}&adId=${ADID}

