Use Live Execution Mode Whenever There is a Meta Match

book

Article ID: 107103

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder) CA Service Virtualization (DevTest / LISA / VSE / Application Test)

Issue/Introduction

When a virtual service request has a meta match, the meta response is always returned. The stand-in mode will never be used because the meta response matched (against either OPERATION or SIGNATURE, whichever was selected).

Stand in works well when there is no match whatsoever, but it is sometimes desirable to have the same behaviour when there is no specific match.

How can I invoke the Live system whenever a service has selected the meta response?

Environment

All supported DevTest versions 

Resolution

To address this, one may add a scripted assertion to the VS Image Response Selection step, as the last assertion. The purpose of this assertion is to detect whether the select response is the meta response or a specific response. 

This assertion should be configured to call the Live Invocation step when returning true.

The script used is 
import com.itko.lisa.vse.ExecutionMode;
if (testExec.getStateObject("lisa.vse.execution.mode").equals(ExecutionMode.STAND_IN)) { 
     if (testExec.getStateObject("lisa.vse.matched.transaction") instanceof com.itko.lisa.vse.stateful.model.TransactionNode) { 
          return true; 
     } 
} 
return false;