Please read more about RDM (Request Data Manager) here Request Data Manager Data Protocol
Using the RDM, create 15 arguments of "wireDetails_0_wireAmount" and update the signature accordingly. Once done, you can set the comparison parameter to compare the incoming value against the desired value. Update the required response according to the matching criteria.
The above solution is not 100% dynamic and if there are more than 15 "wireDetails_0_wireAmount" arguments, the solution will fail.
To achieve 100% dynamic solution, we need to do some scripting. If you find a better solution, please update in the thread for reference.
Original Message:
Sent: Mar 18, 2025 11:03 AM
From: vikramreddy anthireddygari
Subject: What is the option to create virtual services for REST API based calls where the incoming request attributes expected to change
Thanks for detailed response.
Request may come with 5 wireDetails_0_wireAmount attributes, sometimes more than that. The requirement is to compare all the incoming wireDetails_0_wireAmount attributes with a value. If any of them are greater than the comparison, it should return a specific response; if not, the default response should be returned.
could you please elaborate on RDM?
Thank for quick response.
Original Message:
Sent: Mar 18, 2025 09:59 AM
From: SenthilManohar Shunmugasundaram
Subject: What is the option to create virtual services for REST API based calls where the incoming request attributes expected to change
Hi Vikram..
We would need more details on this, to provide a comprehensive solution.. for ex. response details (static or dynamic), no. of operations in the service, what would be the min match criteria etc..
But, with the limited details available in your request, we can think of few options
Option-1 : Considering the response as static
- Capture a transaction and apply operation match. Update the static response in the transaction
Option-2: Assuming Minimal match criteria (For ex. Irrespective of the signature, you just need to match only 1 wire amount and/or user email)
- You can create a signature with you Request-2 details and apply Selective match for 2 arguments (wireDetails_0_wireAmount, wireDetails_0_userEmail) or just any one of the argument depending on the requirements (may be userEmail)
Option-3: Using the RDM
- Using the RDM, create a template Signature with maximum possible wireAmount & userEmail arguments (let's say, around 15)
- Use matching criteria according to the Test scenario you want to test
Option-4: All dynamic (request & response)
- The only way to handle this scenario is to do some custom scripting
- It can be using Match script or SDPH or sometimes with a Simple Assertion too.
If you can provide more insights into your requirements with some example test scenarios, I can provide better guidance
Thank you,
Senthil Manohar, Canada Life Assurance Co.