HTTP Virtual Service to go to LIVE when META response is returned
search cancel

HTTP Virtual Service to go to LIVE when META response is returned


Article ID: 133359


Updated On:


CA Application Test


For the response to go to Live system if there is no exact match in the virtual service. 


Release : All supported DevTest environments

Component : CA Service Virtualization.


It is a customized functionality and not an issue. VS need to be customized.


Here are few options to send the request to the LIVE system when META response is returned from VS.

. When there are no changes to the lisa.vse.requet then the article :

. When the VSE request body need to be modified before going to the LIVE system (LIVE Invocation step) then the article:   will provide information on changing the request.

. When, the endpoint need to be modified with a different URI. In this scenario, Replacement URI field can be used to update the URI.

. When LIVE endpoint does not use a port, then a Web Service Execution XML/REST step can be used instead of Live Invocation step in VSM. When a Test step used in VSM then save  the step response to a property like "LiveResponse" or something else. Then add a "Scripted Assertion" on the Test step to convert the response to Transient form and assign it to lisa.vse.response property. Set the "Scripted Assertion" logic "if False=Fail". Assertion will never fail as code returns true. You can write the custom code or use the below code to set the LIVE response to lisa.vse.response:


import com.itko.lisa.vse.stateful.model.TransientResponse;

import com.itko.lisa.vse.stateful.model.Response;

import com.itko.util.ParameterList;

Response response1 = new Response();


ParameterList metadata = response1.getMetaData();


TransientResponse transRsp = response1.createTransientCopy();

testExec.setStateObject("lisa.vse.response", transRsp);

return true;