Not getting the expected response from virtual service
search cancel

Not getting the expected response from virtual service


Article ID: 135971


Updated On:


CA Application Test Service Virtualization


The response being sent from VSI is not the expected response.


All supported DevTest releases.


The issue was caused by a match script in the VSI.

The match script was setting some property values but did not have any conditions to be verified and decide whether to return the response.

The code return true; was available in the match script and with this option that specific response would be sent regardless of operation or parameters matching.


Remove or comment out the return true; line in the VSI match scripts.

Or use the use the expression, defaultMatcher.matches(). This will return a true or false using VSE's default matching logic.


For more information regarding match script, please refer to the links below:

What is the Match Script tab in a virtual service image - VSI? -

Transactions Tab for Stateless Transactions - Match Script Editor - Refer to section "Transactions Tab for Stateless Transactions" in the documentation of the DevTest release you are running.