Search code examples
restperformance-testingrest-assuredweb-api-testing

How Can I do performance testing using Rest Assured


I am using rest assured to automate my project. In the same project, I want to do performance testing in the API. I want to know how can I achieve this task??


Solution

  • If you have existing set of tests and want to run them in multithreaded manner the options are in:

    However the above approaches will only allow you to kick off your tests in parallel and you won't be able to collect a lot of metrics like:

    • number of active threads
    • number of hits per seconds
    • response time
    • HTTP-protocol-based metrics like response code, connect time, latency

    so it makes sense considering converting your restassured tests into "real" tests driven by the "normal" load testing tool, the majority of load testing tools provide record-and-replay capability by exposing a HTTP Proxy so if you run your restassured tests via this proxy the load testing tool will capture them and convert them into corresponding HTTP requests.