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.
Original Message:
Sent: Mar 17, 2025 10:39 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
What is the option to create virtual services for REST API based calls where the incoming request attributes expected to change.
User Email and Wire Amount are two example incoming request attributes which increase or decrease based on request
Below are the two different examples
Request 1: with only 1 data attribute
wireDetails_0_wireAmount
wireDetails_0_userEmail
Request 2: with 5 data attribute
wireDetails_0_wireAmount
wireDetails_0_userEmail
wireDetails_1_wireAmount
wireDetails_1_userEmail
wireDetails_2_wireAmount
wireDetails_2_userEmail
wireDetails_3_wireAmount
wireDetails_3_userEmail
wireDetails_4_wireAmount
wireDetails_4_userEmail