zoukankan      html  css  js  c++  java
  • jmeter Using JMeter behind a proxy

    2.4.3 Using JMeter behind a proxy

    If you are testing from behind a firewall/proxy server, you may need to provide JMeter with the firewall/proxy server hostname and port number. To do so, run the jmeter[.bat] file from a command line with the following parameters:

    -H
    [proxy server hostname or ip address]
    -P
    [proxy server port]
    -N
    [nonproxy hosts] (e.g. *.apache.org|localhost )
    -u
    [username for proxy authentication - if required]
    -a
    [password for proxy authentication - if required]
    Example
    jmeter -H my.proxy.server -P 8000 -u username -a password -N localhost

    You can also use --proxyHost , --proxyPort , --username , and --password as parameter names

    Parameters provided on a command-line may be visible to other users on the system.

    If the proxy host and port are provided, then JMeter sets the following System properties:

    • http.proxyHost
    • http.proxyPort
    • https.proxyHost
    • https.proxyPort
    • http.nonProxyHosts
    • https.nonProxyHosts

    So if you don't wish to set both http and https proxies, you can define the relevant properties in system.properties instead of using the command-line parameters.

    Proxy Settings can also be defined in a Test Plan, using either the HTTP Request Defaults configuration or the HTTP Request sampler elements.

    JMeter also has its own in-built Proxy Server, the HTTP(S) Test Script Recorder . This is only used for recording HTTP or HTTPS browser sessions. This is not to be confused with the proxy settings described above, which are used when JMeter makes HTTP or HTTPS requests itself. 
  • 相关阅读:
    函数的对象
    函数的调用
    函数的参数
    函数的返回值
    定义函数的三种方式
    网络的瓶颈效应
    编程语言分类
    计算机操作系统
    【建议收藏】2020最全阿里,腾讯,美团面试题总结(附答案整理)
    建议收藏!2020阿里面试题(JVM+Spring Cloud+微服务)上
  • 原文地址:https://www.cnblogs.com/wuxiaoxia/p/6322873.html
Copyright © 2011-2022 走看看