Typically you will face errors while working with HTTPS protocols in HP LoadRunner. The errors you encounter is due to improper configuration of your SSL certificates. In this article, we will see how to resolve SSL certificate errors in LoadRunner and the common mistakes done by performance testers.
By default, you will get below SSL error:
Error -27770: Cannot set Key File for certificate "yourcertificate.cer". Please check file format (should be PEM), password correctness, and matching to the certificate file. [MsgId: MERR-27770]
Usually your web request will be as shown below:
web_set_certificate_ex("CertFilePath=yourcertificate.cer", "CertFormat=PEM", "KeyFilePath=yourcertificate.cer", "KeyFormat=PEM", "Password=yourpassword", //"CertIndex=1", LAST);
How to Resolve SSL Certificate Errors in LoadRunner?
To use this function, you have to add the certificate to the Vuser’s list in the Controller by navigating to Group Information > More > Files or you can copy the certificate to all the machines.
To extract the certificate information, launch Internet Explorer and follow below steps:
- Choose Tools > Internet Options. Select the Content tab and click Certificates.
- Select a certificate from the list and click
- Click Next several times until you are prompted for a password.
- Enter a password and click Next.
- Enter a file name and click Next.
- Click Finish
LoadRunner supports only the certificates which has *.PEM extensions. You can convert your SSL certificates by using this online tool https://www.sslshopper.com/ssl-converter.html
Also, make sure that you are using CertIndex parameter, if you are not using it, the security level will be high, and you MUST provide the valid password. The above function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
Let me summarize the points, you must use the SSL certificate which has PEM extension, you must place your certificates on all the machines(in bin folder), and you must provide CertIndex value.
Do not miss any posts, subscribe now.
Image courtesy of ddpavumba at FreeDigitalPhotos.net
- Measure Client-side Performance using Lighthouse - August 10, 2017
- Perf Calculator – free iOS app for performance testers - July 16, 2017
- How to performance test AngularJS or ReactJS applications? - June 25, 2017
- How to run Apache JMeter tests with Visual Studio Team Services? - June 6, 2017
- Google Test Automation Conference – GTAC 2017 - June 2, 2017