How to filter the VSM incoming request?

Document ID : KB000103167
Last Modified Date : 22/06/2018
Show Technical Document Details
Question:
I need to verify if the request coming to the VSM contains a specific value and then decide the next step.
How do I filter the VSM incoming request?
Environment:
All DevTest supported releases.
Answer:
The property lisa.vse.request contains the request that is being sent to the VSM, and the response of the Listen step also contains the request information.

To verify if a specific value is available in the VSM incoming request, an assertion can be added to the Listen step, Ensure Result Contains String, and provide what is the string you are looking for.
Define what is your requirement, what the next step should be when the string is found (true) and when it is not found (false).

In the example below the assertion, Ensure Result Contains String, is looking for the string 'test' in the 'Virtual HTTPS Listener 8001' step response.
If the string is found (true), the next step will be the 'Virtual HTTPS Live Invocation' step.
If the string is not found (false), the VSM will go to the next assertion and continue the normal flow.

EnsureResultContainsString
Additional Information:
For more information regarding assertions please use the link below:
https://docops.ca.com/devtest-solutions/10-3/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/building-test-cases/assertions