Not getting the expected response from virtual service
search cancel

Not getting the expected response from virtual service

book

Article ID: 135971

calendar_today

Updated On:

Products

CA Application Test Service Virtualization

Issue/Introduction

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

Environment

All supported DevTest releases.

Cause

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.

Resolution

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? - https://knowledge.broadcom.com/external/article?articleId=48402

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.