Setting up Jmeter to do HTTPS

前端 未结 8 1135

I am using a jmeter 2.7 for my load testing. When we started of the urls to use were simple http. Now we have moved to HTTPS. Can some one tell me how to enable ssl in jmete

相关标签:
8条回答
  • 2021-01-01 19:58

    I couldn't get this to work.

    curl -X GET "https://x.com/PROMOT" -k -H "Authorization: Basic YWRtaW46cGFzcw=="
    

    Would work.

    However JMeter 2.13 with https and HttpClient3.1/HttpClient4/Java would error on

    javax.net.ssl.SSLException: Received fatal alert: protocol_version
    

    My site used https only.

    I did a wireshark and the https curl seems to utilize TLSV1 JMeter seemed to do SSLv3 which did not work. Added this property as it works now.

    Added in jmeter.propeties and things work now!

    https.default.protocol=TLSv1
    

    Or an argument with jmeter.

     --jmeterproperty https.default.protocol=TLSv1
    

    A side note: https.default.protocol=TLS exists commented in jmeter.properties, But uncommenting that still defaulted to SSLv3. Had to explicitly change it to TLSv1.

    0 讨论(0)
  • 2021-01-01 20:01

    I had a similar issue. I am on jmeter 3.0. When I tried to access https (by setting the protocol to https) I kept getting a 403.

    I then set the Implementation to HttpClient4 and then protocol to https from that instant it started working perfectly.

    0 讨论(0)
  • 2021-01-01 20:09

    You need to configure a keystore containing the SSL certificate against javax.net.ssl.trustStore in [apache path]\bin\system.properties.

    0 讨论(0)
  • 2021-01-01 20:12

    Three (3) Steps:

    1) Open a command line:
    openssl s_client -connect hostname:port -showcerts

    Copy the 2nd+ certs to notepad or text file, with the BEGIN / END Markers: Application_CA_Public_Cert.cer

    2) Create trust store with Java keytool keytool -importcert -alias APPLICATION_NAME_CA_PUBLIC_CERT -file Application_CA_Public_Cert.cer -keystore jmeter_truststore.jks -storepass Password01

    3) Update Jmeter system.properties file (per notes in Jmeter, all ssl functionality moved to this file)

    JMETER_HOME/bin/system.properties {Jmeter version 2.13}

    https.default.protocol=TLSv1 javax.net.ssl.trustStore=C:/jmeter/apache-jmeter-2.13/jmeter_truststore.jks javax.net.ssl.trustStorePassword=Password01

    0 讨论(0)
  • 2021-01-01 20:14

    I had a similar issue. I am on jmeter 2.9. When I tried to access https (by setting the protocol to https) I kept getting a 403.

    I then set the Implementation to HttpClient3.1 and it worked from there.

    0 讨论(0)
  • 2021-01-01 20:15

    I had the exact same issue using version 2.11 and by changing the Implementation to HttpClient4 and Protocol [http]: to HTTPS in each thread it now works.

    0 讨论(0)
提交回复
热议问题