Not able to do Jmeter UI recording due to CORS error
Asked Answered
H

1

7

We are facing CORS issue in Jmeter UI recording:

CORS request did not succeed

We have website uat.torchmarkets.com which internally calls tradeuat.torchmarkets.com in which has security check for Cross Domain Request. Sharing. We want to do UI recoding for uat.torchmarkets.com

Below is jmeter UI recorder setting

[JmeterUIRecordingSetting

Below is proxy settings in browser. The subdomain loadtesting.torchmarkets.com is whitelisted.

[BrowserProxySetting

Below is there CORS error

[CORSError

Any help to solve this issue will be much appreciated!

Thanks in advance!!

Horbal answered 3/10, 2018 at 10:10 Comment(0)
A
4

In my case the CORS error vanished after importing JMeter's certificate.

In JMeter's bin folder, you will find a .crt file. This one needs to be imported into the browser. I have tested it only with Firefox.

  1. In Firefox, go to Privacy & Security settings section where you find View Certificates...
  2. Select the Authorities tab
  3. Click on Import... and browse for JMeter's certificate
  4. Check This certificate can identify web sites. and confirm

From that point on you should see no further CORS errors, until the certificate expires, which is by default 7 days.

Optionally, in the bin folder of JMeter find the file jmeter.properties and change the validity period of the certificate if you need it for longer than the default 7 days by changing the value proxy.cert.validity and let the certificate regenerate.

Afterlife answered 18/1, 2022 at 8:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.