Search code examples
jmeterperformance-testingload-testingthrift

Thrift API load test


I am new into Apache Jmeter. Basically I want to load test our couple of thrift APIs but have no clue where to start with. It is in java where api takes 2 parameter and then send java object as response.

Any pointer would be very helpful.


Solution

  • You can use JSR223 Sampler + Groovy (add groovy-all.jar in jmeter/lib) and look at this client example, see NonblockingClient code for an example:

    Make your groovy code call a least the following at end:

    SampleResult.setSuccessful(true/false)
    SampleResult.setResponseCode("code")
    SampleResult.setResponseMessage("message")
    

    See:

    And of course, ensure you add the required dependencies in jmeter/lib.