性能测试工具 [Jmeter] Implementation 中 JAVA 与 HTTPClient4 如何探寻两者之间的区别

guji · 2020年10月06日 · 1853 次阅读

最近学习 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
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册