Hi Team,
I have below request coming in lisa.vse.request and the requirement is to extract Argument e.g.URLPARAM0, metaData properties e.g. Postman-Token unique to a transaction (assuming this doesn't change) and if it matches certain value send it to virtual invocation else continue with live. This is little urgent appreciate if you can look into this and help me.
Possible solution I could think is to write assertion script in listener step to capture the incoming data and set execution method to Live.
lisa.vse.request ] {id=0, operation="GET /v1/A1/{URLPARAM0}/{URLPARAM1}/abcd/", arguments=URLPARAM0=12345678901234&URLPARAM1=4, attributes=, metaData=HTTP-Method=GET&HTTP-URI=/v1/A1/12345678901234/4/abcd&HTTP-Version=1.1&Host=localhost:31156&Connection=keep-alive&Cache-Control=no-cache&User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36&Postman-Token=3d793263-8b53-c2d4-157a-b978252eaefa&Accept=*/*&Accept-Encoding=gzip, deflate, sdch, br&Accept-Language=en-US,en;q=0.8&lisa.vse.request.client.id=0:0:0:0:0:0:0:1:53811, matchTolerance=Exact, binary=false, body=(non-binary)<null>]
That will search the request for the string "URLPARAM0", rather than searching for the string "77741900528607".
I see the same error only when I set my responseBody to null, which leads me to think that the body is blank, and the request message is just a GET.
If this is the case, it's the whole request message we want, instead of lisa_vse_request.getBodyText().
Change the line:
requestMessage = lisa_vse_request.getBodyText();
to:
requestMessage = lisa_vse_request.toString();
This brings back the entire request, including your URL arguments, rather than just the request body, and should allow the "contains" to work as expected.