michaelrowe01
3 years agoNew Contributor
building test steps based on service discovery
This may be a very basic request, but I am trying to review ReadyAPI to see if I can use it to discover API Services, and then call those Services as part of my tests. Are there any examples of how t...
- 3 years agoHey michaelrowe01,
There is a REST Discovery or API Discovery function in ReadyAPI, but ive never used it so probably im not best placed to answer this, but no one else has yet, so i'll try and help out.
I had a quick look to remind myself and theres a browser component where it records your submissions to a website and theres a non browser version where you use ReadyAPI as a proxy and capture the traffic that way (kinda like using fiddler).
However, im unsure if those will help you out, considering your second post appears to indicate youre using Postman to poke an endpoint, which returns a response containing a list of endpoints in an xml payload...is that right?
You mention that you then populate Postman variables using the content of the previous response to build further requests. At this point im a bit confused. The content of the response....does this give you lots of different endpoints or does this give you a list of the same endpoints with different parameter values? (Im assuming REST here, unless you say different?)
What i mean is, are you getting something like:
<List>
<endpoint1>http://whatevs1.com/${parm1}/${parm2}/folder</endpoint1>
<endpoint2>http://never.co.uk/value/${parm3}/folder1?qparm1=value&qparm2=value</endpoint2>
<endpoint3>http://catchall.com/folder/${parm4}/folder3</endpoint3>
</List>
So.....the list of endpoints in your response...are they completely different hostnames, folder structures and parameters (both URI and query parms) like my above example
OR
Are they a list of the same endpoints (same hostnames, same full URI, but the parm (both URI and Query Parms) values differ, but all else is the same?
Reason im a bit confused is what variables are you taking to build endpoints in Postman?
Postman has fixed parms just like ReadyAPI....the parm names arent dynamic....only the values are....hence my confusion!
If youre asking is there a way to build request endpoints to poke dynamically in ReadyAPI where the URI and Query Parm NAMES (not just the values!) are dynamic, this is possible but not with the embedded functionality....you need to do it with groovy.
I might have completely misunderstood your post however, so if you could respond with more details and especially examples of the API full URLs you get in your response) that can only help our understanding (which will help people answer your questions).
Cheers,
Rich