[Jmeter] Implementation 中 JAVA 與 HTTPClient4 如何探尋兩者之間的區別

guji發表於2020-10-06

最近學習 jmeter 工具中,發現【HTTPRequest】-【Advanced】有個選項為【ClientImplementation】

  1. Java
  2. HTTPClient4
官網上的描述不是非常理解,不是很明白這兩個選項在實際請求中各自到底有何不同,有什麼辦法可以驗證兩者之間的差異?

超級連結

There are two different test elements used to define the samplers:

  • Java
    • uses the HTTP implementation provided by the JVM. This has some limitations in comparison with the HttpClient implementations - see below.
  • HTTPClient4
    • uses Apache HttpComponents HttpClient 4.x.
  • Blank Value

    • does not set implementation on HTTP Samplers, so relies on HTTP Request Defaults if present or on jmeter.httpsampler property defined in jmeter.properties
  • The Java HTTP implementation has some limitations:

    • There is no control over how connections are re-used. When a connection is released by JMeter, it may or may not be re-used by the same thread.
    • The API is best suited to single-threaded usage - various settings are defined via system properties, and therefore apply to all connections.
    • No support of Kerberos authentication
    • It does not support client based certificate testing with Keystore Config.
    • Better control of Retry mechanism
    • It does not support virtual hosts.
    • It supports only the following methods: GET, POST, HEAD, OPTIONS, PUT, DELETE and TRACE
    • Better control on DNS Caching with DNS Cache Manager

相關文章