API Performance Testing

API performance testing validates the quality of any application or software built using APIs. Ensuring fast and reliable responses is of paramount importance for delivering great user experience.

It is essential to simulate traffic requirements using load testing early on rather than discovering the API can’t handle the necessary workload in production, thus impacting user experience.

Karate is the only open-source tool that enables you to re-use your API functional tests as performance-tests. This is a huge-time saver as you don’t need to re-write your user-flows in a second tool. Karate delegates to Gatling for running multi-threaded API workflows and generating comprehensive HTML reports. Karate tests naturally validate the accuracy of server responses, because of the power and ease-of-use of Karate’s payload assertions. This means that you can have confidence that your performance tests are truly checking for server consistency and accuracy under load. Karate’s low-code approach is also well suited for you to implement continuous performance testing within your CI / CD pipeline.

  • Karate-Gatling Integration
  • Released July 2018
  • Unique in the industry
  • The “Holy Grail” of test-automation

Karate API Performance Testing

Re-use API tests

Save time by re-using functional test as-is

Rich reports

Detailed HTML powered by Gatling

CI/CD Friendly

Enable Continuous performance testing

Runtime Options

Support via Maven or Gradle

Java Interop

Any Java integrations can be perf- tested

Payload Assertions

Confidence that server- responses are accurate

Simple Setup

Easy to add to existing API testing Project



  • Re-use Karate tests as performance tests executed Gatling
  • Use Gatling (and Scala) only for defining the load-model, everything else can be in Karate
  • Karate assertion failures appear in Gatling report, along with the line-numbers that failed
  • Leverage Karate’s powerful assertion capabilities to check that server responses are as expected under load - which is much harder to do in Gatling and other performance testing tools
  • API invocation sequences that represent end-user workflows are much easier to express in Karate
  • Anything that can be written in Java can be performance tested !
  • Option to scale out by distributing a test over multiple hardware nodes or Docker containers


  • Karate introduces a different threading model for the HTTP Client, so if you have to attain a high RPS (Requests Per Second) value, you need to introduce a config-file that is normally not required for “vanilla” Gatling. We have found that by default an RPS of around 30 is suppported, but to go higher - please see Increasing Thread Pool Size.
  • As of now the Gatling concept of “throttle” and related syntax is not supported. Most teams don’t need this, but you can declare “pause” times in Karate, see pauseFor().