How to solve login fail issue in JMETER Script

After recording the script in JMETER, if we run the script without making any changes, login fails.

To solve this problem, please follow below steps.

After recording, select login page to see the http request.

In http request, under parameter table, nonce appears at the top of the table with some random values as shown in image below.

Delete “nonce” from the table and run the script again.

Login successful !!

Web application Performance Testing using Jmeter

  • Go to bin folder of apache-jmeter
  • Launch jmeter by clicking jmeter.bat
  • In Jmeter, Go to File -> Templates
  • Select Recording from the Select Template drop down.
  • Click Create and enter application url in hostToRecord text box.
  • Click Create. It will create the performance test plan.
  • To start the recording, select “HTTP(S) Test Script Recorder”
  • After clicking the start button, Root CA certificate will be generated.
  • This certificate is valid only for 7 days. Start the browser and import the certificate.
  • Go to IE->Internet Options->Contet->Certificates-Import
  • Once the certificate imported successfully, change the IE LAN settings to localhost with the port mentioned in JMeter recorder global settings.
  • Once the above setting is done. Enter the application url in IE and start recording the performance scenario.
  • Once the recording completed, this is how the Jmeter will look.
  • Add summary report and aggregate report in the plan to get the performance results.
  • Right click on Test Plan -> Add -> Listener -> Summary Report/Aggregate Report
  • Performance Test Plan is ready to run.
  • Select Thread Group. Change the Thread number as per the requirement and click green button to start the performance testing.
  • Once the execution finished, summary and aggregate report will be generated.