JMeter - Why is my variable being re-evaluated midway through my test? -


i posted question in more complicated way, i've reproduced issue more i'm extensively editing post.

i have simple test plan exercise api.

test plan tree

the first thing create session simple http post. extract session id response using json path extractor plugin:

json path extractor

this reads newly created session's id variable called id_json, , subsequent put requests use session id in path, i.e. /api/sessions/${id_json}/account.

this works well, have noticed intermittently, id_json have default value not_found. samples fail , when @ request, can see trying hit /api/sessions/not_found/account instead of valid id. what's confusing me right happen after requests have referenced ${id_json} , generated valid path. seems should impossible, unless value of id_json being dynamically checked or looked repeatedly - otherwise how coming different value 1 request next?

it seems if sample fails, reason, subsequent requests in same thread iteration fail id_json having default value not_found.

do need declare or manage variable id_json in special way ensure value of session id , retain throughout thread iteration, until next iteration overwrites next session id?

the extractor post processor, meaning applied after each sampler. in case run on first , 4 puts.

so noticing absolutely regular, , if sampler fails, extractor fail extract id , put not_found in value.

if sure not change, put post processor child of first http request called "create session", run , variable not change anymore.

you can read more on at:


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -