3

https://gatling.io/docs/current/http/http_protocol/#http-protocol-connection-sharing

How do you share connections using karateProtocol?

unclelim12
  • 603
  • 1
  • 8
  • 22

1 Answers1

2

This is not supported directly. This is an opportunity for you to contribute to Karate :)

Note that this may require you to implement a custom HttpClient which is not too complicated - if you know Java: https://github.com/intuit/karate/tree/master/karate-mock-servlet#switching-the-http-client

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • 1
    Oh I see, thank you for replying so fast. You have been amazing at support! – unclelim12 Feb 21 '20 at 10:55
  • @ShawnLim thanks :) to be honest this is an area we haven't researched much, I was just reading this: https://hc.apache.org/httpclient-legacy/performance.html - and it looks like the Apache HttpClient does re-use connections by default. but you can investigate. also look at the code where we set up apache, maybe there is something extra we can do there: https://github.com/intuit/karate/blob/master/karate-apache/src/main/java/com/intuit/karate/http/apache/ApacheHttpClient.java – Peter Thomas Feb 21 '20 at 11:04