SDET Unicorns

Javascript API Automation Tutorial Series

Table of Content

API testing is extremely important to ensure your application’s business logic or the functionality of the APIs are working properly as well as to ensure they are performant and secure.

Some of the advantage.s of doing API testing:

  • Early application access: You can start testing the APIs the moment they are built without having to wait for the UI layer to be ready
  • Test speed: API automation testing is a lot quicker and covers more application ground in less time compared to browser testing
  • Easier to maintain: If you’ve worked on browser tests then you probably are aware of with some of the pain points around flaky tests. With API tests, you don’t have to worry about that as tests are a lot more stable and consistent (most of the times)

There are primarily two ways of performing API testing:

  • Manual: by using tools like Postman or any other API console
  • Automation: programmatically running your API tests using the programming language of your preference

In this tutorial series, we will walk through both the options but mainly focusing on the latter option (Test Automation)

Some of the items we will be covering in this series:

  • Basics
    • What is an API?
    • What is REST API?
    • Different types of API Methods
    • What contains in an API Request?
    • What is API testing and the advantages of API testing
    • What technologies we will be using for API testing
  • Installation / Configuration
  • Write API automation tests with Javascript using Mocha, Chai JS, and SuperTest HTTP Library
  • Scale API automation test framework
    • Learn how hooks work and when to use it
    • Write some negative tests to increase our test coverage
  • Generate fake test data to make tests more dynamic
  • Generate HTML reports using Mochawesome reporter
  • Integrate tests with Jenkins
  • and a lot more…

My Resources

Thrive Suite: The all-in-one WordPress theme I used to create my blog.
Jasper AI: My favorite AI writing tool.
Surfer SEO:  A tool to help you rank your content on the first page of Google.

Write Content Faster

5/5

Write blog posts that rank for affiliate terms!

Join our mailing list

Unlock the Secrets to Becoming a SDET Pro in the Industry!

Stay ahead of the curve! Join our mailing list for exclusive insights, tips, and the latest industry updates delivered straight to your inbox

Table of Content

Related Post

7 Principles of Software Testing

7 Principles of Software Testing with Examples

Software testing plays a crucial role in the software development life cycle as it helps ensure the quality, reliability, and performance of the final product. Software testing is not just about finding defects; it also provides valuable insights into the overall quality of the software. By conducting effective software testing, it shows how well the application behaves in different scenarios and whether it meets user expectations.

Read More »
Differences Between CI/CD and DevOps

Key Differences Between CI/CD and DevOps

Software development is far from a simple journey that involves merely executing code and launching applications. It often presents challenges, as it’s rare to get everything right from the start. Each time you implement new or frequent code changes, you inadvertently introduce potential issues that can be time-consuming to resolve. This complexity necessitates a structured approach to ensure smooth production.

Read More »