cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically call REST endpoints

SOLVED
Highlighted
New Contributor

Dynamically call REST endpoints

Hello. I have an API that needs to be tested and it looks something like this...

 

/animals

/animals/{type}

/animals/{type}/species

/animals/{type}/species/{speciesId}

 

and so on. In total I have about 75 endpoints that need to be tested. For all of these I only need to test GET requests so the only difference between each request is the endpoint being called and the URI parameters being passed. Of  course I could create a test step for all 75 endpoints then have a test step for each one, but that would obviously be very tedious to set up.


What I'd like to do, if possible is have a single REST request to which I pass the entire URI, so I first call /animals, then /animals/{type} etc.. Is there any way to do this in ReadyAPI? I'm also open to possible alternative solutions.


Thanks,

 

--Drew

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Dynamically call REST endpoints

To create test steps, one have to either someone code to generate or create them manually.


Regards,
Rao.

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Dynamically call REST endpoints

To create test steps, one have to either someone code to generate or create them manually.


Regards,
Rao.

View solution in original post

Highlighted
Community Manager

Re: Dynamically call REST endpoints

Thanks Rao!

 

Hi @dingram ! Does this answer your question, or would you like to clarify more?


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
New Contributor

Re: Dynamically call REST endpoints

It does. Thanks.

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors