When the VSI size is large, it is hard to open it and make any changes. This article will provide you options on splitting the VSI into multiple VSI's based on the functionality you are looking.
How a large VSI can be split into multiple VSI's and achieve the same functionality as one VSI?
The provided options worked for few customers in functional testing and not tested in performance testing.
Option 1: If the request can be identified on argument, operation name, etc, then the below customization should work.
- Split the VSI into different VSI's based on transactions and/or operations. For example, VSI_1, VSI_2, VSI_3,...etc.
- Customize the VSM to use multiple VSI's (add additional VS Image response selection steps to use different VSI's)
In the VSM-->HTTP Listen step, add the assertions to check for specific argument value or operation name from the request (from the property lisa.vse.http.current.transaction.body) and if the assertion returns true then goto specific VSI. For example, the first assertion can be to check for a specific operation and go to VSI_1. If not, do the second assertion where it can check for argument or operation and go to VSI_2, and so on. Below screenshot shows a sample VSM:
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKpUAAW" alt="getUserAssertAndVSI.PNG" width="1106" height="801">
Option 2: Search all VSI's one after another, then the below customization should work. In this option, only specific responses will be returned in the first 2 VSI's and in the 3rd VSI Specific, META/No Match response will be returned.
- Customize the VSM to use multiple VSI's (add additional VS Image response selection steps to use different VSI's). For example, you are using 3 VSI's. Add NoMatch=true to META transactions and also to unknow transactions in first 2 VSI's. See the below screenshots 1 & 2 for reference. Leave 3rd VSI as is.
. Then add assertions in first two VS Image response selection steps to check the "NoMatch=true" is returned or not (screenshot 3). If it is true, then goto the next VSI. When a transaction hit the VS, it first looks in VSI_1.vsi. If no specific match is found then assertion it will return "NoMatch=true" and assertion will be evaluated and goto second VSI, which is VSI_2. If no specific match is found then it will goto third VSI, which is VSI_3. If it finds a specific or META then the response is returned. If nothing is found then a No Match is returned.
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKpVAAW" alt="MetaTrans.PNG" width="1077" height="611">
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKpWAAW" alt="UnknownTrans.PNG" width="1172" height="640">
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKpXAAW" alt="VSMAssertion.PNG" width="1292" height="477">
Note: For any customization, we recommend to work with CA services and the above options are workarounds that anyone can use in DevTest.