Virtual Service - Conditional Routing based on request data and database lookup
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Virtual Service - Conditional Routing based on request data and database lookup
For ReadyAPI Virtual Service, Is there a way to route based on the value of a database query (augmented with some request value)?
I have a request with no static identifier, the only identifier is a guid (a random string of alpha numeric characters). I would like to perform a database look up on what user/value this guid maps to and then decide to route it or not.
I know there is database sources, however most documentation cites datasources for use in the response.
Any insight is appreciated.
Thanks!
- Labels:
-
Scripting
-
VirtServer
-
Virtual Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What type of service are you testing?
If REST, we could use a parameter dispatch style, so that if a certain test parameter equals a value (ie the db query) that it will output a certain response.
https://support.smartbear.com/readyapi/docs/virtualization/configure/dispatch/parameter.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response.
In my case, it is a REST Service, there are instances in which parameters are used, however none of which are adequate for the routing logic.
I'd like to avoid reaching the Dispatch stage unless there is a way to re-route the request to the actual service instead of using a mocked response.
I have many apis in which they only identifier is a random string that needs a mapping to a database value in order to determine to route or not.
