0

I am trying to run RESTful API performance test against a web app using JMeter. In the actual case, a web site would make 4-5 asynchronous API calls to the web app under HTTP/2 in one connection using multiplexing. I already have the HTTP2Sampler plugin installed in JMeter but I have no idea how to make those call within one TCP/IP connection.

Jasper_Li
  • 234
  • 2
  • 9
  • You need to put your requests in a thread group. Don't have time to write more now, but you can find details with that search term: "JMeter thread group". – DavidS Jul 28 '17 at 19:08
  • Threads under the same thread group would make requests using the same TCP/IP connection? – Jasper_Li Jul 28 '17 at 19:17
  • Oh good question. I misunderstood your question: I do not know the answer. – DavidS Jul 28 '17 at 19:30

1 Answers1

0

There's no built-in JMeter Sampler that provides this functionality out of the box. You can, however, go with one of the following options:

  1. Use HTTP/2 sampler developed by someone else. Quick search brought a couple: this and this. I never used them, so cannot speak to whether they are stable, and of course only you can tell if they match all your needs.

  2. Develop a custom JMeter Java Sampler. This is a good option if neither of the above samplers can be used, and you don't want to spend too much time learning all the details about JMeter API to develop your own custom plug-in.

  3. Develop your own HTTP/2 plug-in. This option is more expensive than option 2, but if you willing to invest into a flexible sampler with the variety of features, this is a way to go. Best place to start is to look at the source code of the existing samplers, such as ones I mentioned in 1., or any other samplers available through jmeter-plugins.org

  4. And then fastest option is to write your code in BeanShell sampler. The drawback is of course maintainability of such code, as well as potential issues with performance, error handling and so on. But this is a good option for one time test with fairly simple flow of operations.

timbre timbre
  • 12,648
  • 10
  • 46
  • 77