Update VSE request headers before going to LIVE System
search cancel

Update VSE request headers before going to LIVE System

book

Article ID: 378591

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

This article will provide information on updating VSE request headers before going to LIVE System or for doing any other customization in the VS.

Environment

All supported DevTest releases.

Resolution

The below code can be used in Scripted assertion or in Excute Script step after the HTTP Listen step to update the lisa.vse.request headers test-key & auth with the new values.

--------------
import com.itko.util.ParameterList;
import com.itko.util.Parameter;
 
ParameterList newmetadata = lisa_vse_request.getMetaData();
newmetadata.setParameterValue("test-key", "test123");
newmetadata.setParameterValue("auth", "Basic 123");
lisa_vse_request.setMetaData(newmetadata); 
return true;
-------------------
 
NOTE: Set the logic of the Scripted Assertion to If False, Fail the test. Assertion should never fail unless the code is incorrect.