Unable to login into OKTA application when using jmeter's recording controller (proxy) - jmeter

I'm able to login into the OKTA application, when I'm NOT recording the jmeter script using jmeter's proxy server(using Test Script Recorder). But, as soon as I setup my browser to use jmeter's proxy server (Test Script Recorder) for recording, I'm NOT able to login into the application itself. I see error "Please try your request later.The system is having techical difficulties". But the application works fine without proxy and i am able to login to OKTA application.
Steps:
Open jmeter. In test paln add test script recorder and change the browser IE Lan settings port to 8888 which is specified in the recorder.
Launch Application.
Give username and click on next
Error is encountered. "Please try your request later.The system is having techical difficulties"
But it works fine when i launch the application without any proxy.

Most probably you need to import JMeter's self-signed certificate into your browser, the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start JMeter proxy server.
See HTTPS recording and certificates chapter of the HTTP(S) Test Script Recorder documentation for more detailed explanation.
Remember when something goes wrong most probably you can find a clue in jmeter.log file
There is an alternative way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies and certificates, just execute your use case in browser and once done you will be able to export the recorded script in form of JMeter .jmx file

This probably is due to the way Jmeter is parsing(and resending) the OKTA data(token, response etc.).The data parsed and sent by Jmeter proxy is unacceptable by the server and hence the error.Try saving the .har and then convert to jmx for jmeter use and see the difference.
Using Jmeter extension on Chrome might help too for recording.

Related

apache jmeter does not show my data in the browser (I use FireFox as a browser)

i am testing using jmeter, but my data does not arrive when I start the browser with http test script recorder. i can't do operations such as insert update either
If JMeter doesn't work as you expect in the majority of cases the answer is in jmeter.log file. It's also a good idea to check your browser console and look for any suspicious entries of WARN and/or ERROR severity.
In the majority of cases problems with recording are connected with HTTPS and JMeter's self-signed certificate installation, see HTTPS recording and certificates chapter of JMeter User Manual on the HTTP(S) Test Script Recorder for more details.
Also be aware that it's possible to use JMeter Chrome Extension for recording your browser actions into JMeter .jmx script, in this case you won't have to worry about proxies and SSL certificates.

Jmeter+Postman , jmeter isnt connecting with jmeter

Postman Collection that i run
isnt appearing in jmeter
i changed the proxy in postman and jmeter
but still im facing the same problem
Make sure to start the HTTP(S) Test Script Recorder, you need to click the "Start" button
If your Postman test is using HTTPS protocol - you will additionally need to install JMeter's certificate into postman
the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start the HTTP(S) Test Script Recorder
Configure Postman to use JMeter as the proxy:
Assuming all above steps are successfully implemented you should be able to record the Postman collection execution in JMeter. See How to Convert Your Postman API Tests to JMeter for Scaling article for more comprehensive instructions if needed
add ssl certificate
configure the proxy
if computer have something like special vpn or work vpn, close it

Is there a reason I'm not able to start the HTTP(S) Test Script Recorder

enter image description here
I do not have workbench on Apache 5.3 and due to which I don't have HTTP Proxy Server. I used the HTTP(S) Test Script Recorder. Started Chrome and manually configured the proxy settings. Settings => Advanced => Network => Manual Proxy:localhost and port as 8080(same as configured on the HTTP(S) Test Script Recorder). enter image description hereBut when I click on Start button on the recorder, Im getting the below error. Can someone please help
The error you're getting means that JMeter is not able to generate proxyserver.jks file (Java keystore to keep MITM certificate allowing JMeter to intercept and decrypt SSL traffic) because it doesn't have read/write access to the folder where you launch JMeter from.
The solutions are in:
Run JMeter as administrator, administrators have full control over all folders
Change proxy.cert.directory property to some folder where your user has access rights
If for some reason you cannot go for steps 1 and/or 2 you should be able to record your test scenario using JMeter Chrome Extension

Why website is not accessible by clicking on login button while recording it with proxy server using Jmeter?

I have set up a proxy server and trying to record a script by adding "http script recorder", but the problem is I am able to access a website but not able to login.
my website has been loaded but once I enter credentials and click on the login button then a website is not behaving, login button also not responding.
In case of any problems with JMeter first of all you should look at jmeter.log file, if anything goes wrong JMeter normally writes an error message to this log file which in majority of cases is enough to get to the bottom of the issue.
With regards to your problem, my expectation is that login normally uses HTTPS protocol and you need to perform some extra configuration so JMeter would be able to intercept and decrypt HTTPS traffic.
You need to install JMeter's self-signed certificate to your browser, the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start JMeter proxy.
You just need to import it into your browser and it should resolve you issue. Follow your browser documentation to learn more about certificates installation processes, some hints are also given in the HTTPS recording and certificates chapter of the HTTP(S) Test Script Recorder JMeter User Manual entry.
Alternative way is using JMeter Chrome Extension, in this case you won't have to worry about proxies and certificates so the recording process will be faster and easier.

JMeter Script Recording Issue - Proxy Working, but No Recording

The current state of my JMeter setup and test plan is:
JMeter 5
Certificate Authority generated and imported into Firefox.
Checked that the port # in the HTTP(S) Test Script Recorder matches that in the proxy server set up in Firefox.
Have added a Recording Controller to my Thread Group.
Have added Cache and Cookie Managers to my Thread Group.
When I start the proxy server, i.e., Start the HTTP(S) Test Script Recorder, I can walk the example application I'm testing - including HTTPS requests. (And if the HTTP(S) Test Script Recorder is not started I get "The proxy server is refusing connections" message from Firefox.)
I have ensured that the selected Target Controller in the HTTP(S) Test Script Recorder is a recording controller I've added to my Thread Group.
No Sampler/Requests are being added under the Recording Controller.
Has anyone else encountered a situation in JMeter in which the proxy server seems to be working correctly but no sampler/requests are actually being recorded? And even if this case is novel, do you have any suggestions? Thank-you in advance for your advice.
Take a look at jmeter.log file - if there is an issue with your setup you should get some clues regarding what's wrong from there. It is also a good idea to add the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.proxy" level="debug" />
it will increase log level verbosity for the HTTP(S) Test Script Recorder
Make sure your Firefox is configured to use the proxy for all protocols and there are no exclusions for localhost, 127.0.0.1 or your IP address/hostname
Try clearing your browsing history as it might be the case "stale" certificate is still present or something is cached.
As the last resort be aware of an alternative way of recording a JMeter test using JMeter Chrome Extension - in this case you will not have to worry about proxies and SSL certificates.
You shouldn't create your own Test Script Recorder script, simply because you can make mistakes, just use predefined JMeter's template
Choose Menu: File -> Templates
(Recording is selected) Click Create
Your Recording script is set
you need to add ApacheJMeterTemporaryRootCA certificate in your firefox by setting
Go to tools > option > Certificate > View Certificate > import certificates.
Now restart the firefox.
just a late reply but facing same issue...
Have you tried to clean the 'URL Patterns to include' in HTTP(S) Test Script Recorder ?
It did work for me and could record was the proxy was not recording.

Resources