<linearGradient id="sl-pl-bubble-svg-grad01" linear-gradient(90deg, #ff8c59, #ffb37f 24%, #a3bf5f 49%, #7ca63a 75%, #527f32)
Loading ...

QA essentials

Your go-to quality assurance source

Testing Challenge – API Automation Testing Exercise

In today’s testing challenge we cover API testing. I used Cypress and Javascript to complete the API automation testing exercise although it can be done with any API library or tool as you like. If you fee like learning new things you can try something new you haven’t tried yet. The application under test is Restful Booker API which we covered already in API testing challenge for manual testing. This time we are moving our tests to automation suite and as that usually happens some new bugs were noticed which I haven’t seen before. In any case, I’m sure you will be able to see all of them on your own.

The challenge

Read the documentation for the API carefully. See what are the prerequisites for successful API responses. Document the happy paths for each of the tests and then expand the test cases with negative scenarios. Pay specific attention to authentication and what response messages should be received for each of the requests. If you haven’t done the manual testing challenge for Restful Booker I would start there following the basic testing guidelines. When you test the API manually and get familiar with all the test cases, then decide what would you automate. Consider doing a risk analysis and prioritization of the most important requests and cases related to those requests.

The automation framework rules

Make sure you follow the best practice for automation testing. Avoid hard coding the test data, create comprehensive reporting and extract common functions into reusable components. If you have some plugins that make your testing easier, by all means use them. Feel free to share your results and repos in the comments section. My result you can find in this repo. The repo is public and open for cloning. Remember to have fun with this API automation testing exercise.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! We keep your data private and share it only with third parties that make this service possible. Read our privacy policy for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.