Search code examples
jmeterjmeter-5.0

Is it possible to send a user certificate when recording a script with JMeter?


I try to record a test script and the server identifies/authenticates users by certificates, then it is needed to send a user certificate.

  • I imported my p12 certificate in a jks keystore in PKCS12 format.
  • I defined the properties javax.net.ssl.keyStoreType (PKCS12), javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword in a properties file.

But it seems like the certificate is not sent.

Does someone know how to check if the certificate is sent to the server ?

Does someone achieve to record a script with a server that authenticates users by certificates ?

Is it even possible ?

I read a lots of articles about using a user certificate to execute a test script but no one to record one. For example this one : Sending client certificate with JMeter load test.

Thanks for any helps.


Solution

  • In fact this is possible, there are two options :

    • using -D options to valuate the properties in the jmeter command
    • using -S option to define the properties in a dedicated file

    In fact properties defined with the -p option are not the same than those defined with the -S option.