I’m facing issue with correlation value since it’s not passing to POST request URL. Getting 500 response due to this. When i checked trace log, the value is printing but it’s not passing to the post request and it’s getting null value into that. Can you pls let me know how to pass this to post request url.
PFB code snippet which we pass the value into request.
code snippet:
I’m extracting the below sap context id(cr_sapcontextid) from request_59 and passing this cr_sapcontextid attribute to request_73 which is post request url.
sap contextid –> SID%3aANON%3aIKAWEQQM1AS01_QM1_22%3aaK-v0cVqxAmjhvTxkhcyJ7Pq3-rrJlales9-RB1E-NEW
How do you “extract” the sap context?
Can you show us the corresponding save("cr_sapcontextid") with the associated check?
Are you sure the value is present in the session (to be readable from the Gatling Expression Language you use in your request_73)?
and can see the below sap context id value in trace log as well. But it’s not passing to request_73.
Pls let me know is there anything wrong which i did here.
Trace log:
sap contextid value–> SID%3aANON%3aIKAWEQQM1AS01_QM1_22%3aaK-v0cVqxAmjhvTxkhcyJ7Pq3-rrJlales9-RB1E-NEW
Pretty sure that’s exactly what I said: your regex is broken and is capturing an empty String instead of the expected value.
Try using an online Java regex evaluator.
But can see the below capture value for sap contextid in debug log which i’m printing in the script.
This’s what i expected. But the thing is why it’s passing the empty sting to request_73 since we’re capturing below value in “cr_sapcontextid” attribute.
sap contextid value–> SID%3aANON%3aIKAWEQQM1AS01_QM1_22%3aaK-v0cVqxAmjhvTxkhcyJ7Pq3-rrJlales9-RB1E-NEW
The snippet you’ve provided doesn’t compile. You’ve edited it and broken it.
I suspect request_59 and request_73 are both resources of the same request. If so, you have no guarantee that request_73 will be executed after request_59 completes. That’ the whole point of resources: fetched concurrently.
If so, you must move them out of the resources block and execute them sequentially as normal requests.