Service Virtualization

 View Only

 Is there a way to ignore all the (other) arguments of Incoming request in DevTest except the required one.

Anzar Ahsan's profile image
Anzar Ahsan posted Apr 18, 2022 02:19 AM
I am trying to find a solution which will ignore all the arguments from request payload except the required once.

For Ex :-
From below req payload -
{
"custData" : {
"relationCode" : [
"code1",
"code2",
"code3"],
"custKey" : {
"legalid" : "somevalue"
}
}
}

I want to just validate the incoming calls based on the values we are receiving for "legalid".
Number of RelationCode is varying from request to request, hence cannot use operation match as signature of request is changing every time and I have to make virtual service respond with exact match as Meta response is set to default/faulty response.

I have tried clearing out all the arguments and adding the required argument in new list from SDP but it's not working.

Kindly provide the suggestions. Thanks in advance
Danny Saro's profile image
Broadcom Employee Danny Saro
Hi,

If you are using version 10.7 then have a look at the new feature called "Selective Match Tolerance" (https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/devtest-solutions/10-7/using/using-service-virtualization/service-virtualization-concepts/match-tolerance.html#concept.dita_6eba5512efed400e9ec95c8e457c8c31d01703ad_SelectiveMatchandSelecttoMatch)

If you are using version 10.6 then you need to add a RDM DPH to your Listen step (Request Data Manager) in your VSM. The RDM needs to be configured with one action "Keep Argument legalid", this will reduce the signature of any incoming request to only this one argument "legalid" (all the other arguments will be removed), as a consequence also all your signatures in your .vsi need to have this signature to allow for a matching.

If you are creating the virtual service via recording or request-response pairs then you can add the RDM DPH at the appropriate window while stepping through the wizard, that will keep your Listen step and your .vsi in sync.

If you have an existing virtual service that you want to adapt then after adding the RDM DPH in your .vsm you will need to also edit your .vsi and correct the signatures.

Hope this helps,

Danny



Anzar Ahsan's profile image
Anzar Ahsan
Thank you for the information Danny. I am using 10.6 and have used RDM in VSM.
Issue is resolved.
Vaibhav Jain's profile image
Vaibhav Jain
Hi Ahsan,

Option 1: You can filter out the arguments using the Request Data Manager protocol. 

Option 2: Set the Operation/Argument name using SDP post reading the json path of tag legalID

Kind Regards,
Vaibhav J