Checklist of Best Practices for Load Testing an API

  February 05, 2020

Suppose you have a single-page application and want to ensure it’ll meet service level agreement standards under a certain load.

You could build a user interface (UI) load test, but many of these tests don't account for JavaScript execution time. On the other hand, you could build an API load test to ensure the correct JSON back-end responses are sent to the client front-end application. But that has its own drawbacks. There are pros and cons to consider for each.

Read about the difference between UI load testing and API load testing, and how to decide what's the right approach for your application.

Use this checklist to ensure that you’re covering all of your bases when load testing APIs.

  • Start with the highest trafficked and/or most critical endpoints.
  • Create performance goals when writing user stories (e.g. shift-left).
  • Repurpose functional API tests into load tests where appropriate.
  • Incorporate API load tests into your CI build processes.
  • Don’t forget to send reporting to the appropriate parties.
  • Create processes for handling any bottlenecks that are identified.
  • Document any other API issues that arise when writing performance tests.

Start your free, 14-day LoadNinja trial.

Suppose you have a single-page application and want to ensure it’ll meet service level agreement standards under a certain load.