ReTestBash UK 2022 - Next Level API Automation - Julia Pottinger

Next Level API Automation with @ailuj876

Talk Description

APIs are an essential part of an increasingly large number of applications that we use daily. APIs enable applications to exchange data and functionality easily and securely. As testers, we want to ensure that our APIs do not break and provide the expected functionality. We can automate our APIs to speed up the rate at which our checks are done. When automating APIs having tests to ensure that your API returns the correct message and status is great, however, do you test for and automate the negative and edge cases for your APIs? In this talk, I will show you how to get started with automating APIs, a checklist of things needed to automate an API, automate negative tests for your API as well as check that your APIs handle errors appropriately, follow the specified schema, and don’t reveal data that it shouldn’t or has certain security gaps. I will also share how to decide which tests you should be automating for your API and how to automate workflows for an API.

API automation executes faster than UI-automated tests and I have found it to be more straightforward to write. Join me to start creating these quick automated tests using Supertest (a JavaScript API Testing Framework) for the boundaries of your API. The tips that I will share can be applied to any framework that you use to automate APIs.

Takeaways

  • Understand APIs
  • Negative scenarios to automate for APIs
  • Understanding and using schemas to validate your APIs
  • Testing APIs in Postman
  • Automate APIs in Javascript
  • API workflows
  • API Testing Checklist

We’ll use this Club thread to share resources mentioned during the session and answer any questions we don’t get to during the live session.

1 Like

Resources

1 Like

Questions Answered Live

@bethtesterleeds - What were your memories of the conference itself? Did you enjoy the workshop or the talk more?

@simranpal07 - Should we have integrated api automation tests (for e.g passing the response of one api to another and so on)?

Anonymous - What is your advice/suggestion for someone who has some api knowledge but looking to expand and also get comfortable with different tools for api automation?

@shashikumar - Do you recommend TypeScript over JavaScript for API test automation with Mocha -Chai framework? How is it beneficial for implementation?

@stuartdewar - Have you ever been asked to report on API Automation? If so how do you do this to those less technically inclined / more focussed on the UI stuff?

@vedantbajpai - What is best practice for handling test data for API framework development when you are dealing with xmls and jsons both?

Anonymous - In what aspects PactumJS different from Postman?

@tressaking - We use K6 is that the same as Pactum? or should I try this other tool?

Question Not Answered Live

Anonymous - There are so many frameworks out there - do you also have any thoughts on Karate and OpenFeign frameworks?

1 Like