Hi all, I am new to API automation with ReadyAPI. Great if anyone could advice me on below scenario with the industry best practices.
I have a requirement to create an API regression test suite which will supports multiple environments(Dev, UAT, Pre-Prod etc).
My question is, is that possible to create a single test suite which can be executed in different environments with assertions according to the environment if not what is the best approach?
Ex: There is an API to retrieve person data. I want same to be executed in different environments and also assert the data based on the environment and also change the request data automatically when the environment is changed.
Thanks in advanced 🙂
Solved! Go to Solution.
Thanks Rao for the reply.
I have tried the Environment feature but what it does is change the your base URL and I couldn't find a way to change the test data and assertions based on the selected environment.
There is an API to retrieve person data. I wanted to run the same in Dev, UAT and pre-prod environments. But the databases are different(dev person id- 100 is different with UAT person id- 100(two different persons)). As a result of it , the name I wanted to assert in dev is different with the name in UAT.
Therefore I just wanted to know whether it is feasible to do this with a single Test suite or I need multiple suites for each environment since the databases are different.
@richie Thanks for your detail explanation.
Could you please let me know how the assertions are implemented in your case?
Thanks in advanced.