httpjmeterstreamingperformance-testing

Does Jemeter supports HTTP streaming responses?


I have an endpoint which calls ChatGPT streaming search API. My endpoint returns the streaming data from ChatGPT API. I want to write a performance test for my endpoint. I am wondering whether Jmeter will work properly with streaming response?

I tried to google but could not find much information about this topic. Would appriciate it if soneone could help.


Solution

  • As per OpenAI API Reference

    Streaming

    The OpenAI API provides the ability to stream responses back to a client in order to allow partial results for certain requests. To achieve this, we follow the Server-sent events standard. Our official Node and Python libraries include helpers to make parsing these events simpler.

    Out of the box JMeter doesn't support Server-sent events so you will have to use a library like okhttp-eventsource from JSR223 Sampler

    See How to Load Test SSE Services with JMeter article for more information and reference code