Record web application using Apache JMeter:
Web Application : A web application is a computer program that utilizes web browsers and web technology to perform tasks over the Internet.Before starting the recording, you need to know how the web application is being accessed. I mean with proxy or without proxy. you can refer "How to open JMeter to record a web application? - click here" page to know about this.
Once you are clear with the functional flow and you have the necessary application URL & login credentials, required test data, you can start recording.
First Step : Which traffic are you going to record?
Image source : Google
If you are going to record a web application that uses Https protocol, then you need to add Jmeter root certificate in browser settings. You will get this Jmeter root certificate by default when you downloaded Jmeter. It will be available under bin folder. It looks something like this:
How to add this certificate to browser:
Go to proxy settings (paste this url in chrome : chrome://settings/?search=xy) then open proxy settings.
Click on content tab:
Then click on certificates:
Now click on Import:
After clicking on import, you need to click on "Next" and browse your Jmeter root certificate. As I said earlier, this root certificate is available in bin folder. So, after you browse the file, it will look something like this:
Now click on next, here the certificate store is by default "personal". You need to change it to trusted root certificate authorities. To do so, click on browse button and select the second option. Please follow the below process as described in image:
Click on Next and finish the process. You should be able to see the message as below:
That's it !!! You have added Jmeter root certificate to the browser.
In case of recording a web application that uses http protocol , you no need to add this certificate.
Second step : Make browser ready to record application:
Go to proxy settings (paste this url in chrome : chrome://settings/?search=xy) then open proxy settings.
Click on LAN Settings: (Make sure you are under connections tab)
Check use proxy server check box and enter localhost in address filed and port as any thing in PORT filed. Here I used port as 8088. You need to remember this port number as you need to give the same port number in Jmeter as well.
Third Step : Make Jmeter ready to record:
After starting Jmeter, set up the web test plan before starting the recording. To set up web test plan you can refer my previous post (How to set up a web test plan ? -- click here)
All the changes we need to do are in HTTPS Test script recorder which will be under work bench.
- Change the port number in Test script recorder -- This must be same as the one you have given in brower
- Select the transaction controller in which you want to record the flow. For example, I want to record an application in which I have selected the flow --> Launch URL --> Login to the application --> Logout. So, I am going to select the transaction Launch URL while recording the launch activity in browser.
- you can click add suggested excludes which will exclude the requests which are in static nature (say, GIF, JPG and img).
Please refer to the below image and follow it in step wise.
If you do not select transaction (step 2 in above image ) and click on start recording you should be getting the below error message.
If you give port name properly and selected the transaction then click on Start button. A pop up as below should be displayed.
This is not an error. you can just click on OK and proceed with your recording.
Recording :
Click here to see the Video
That's all for recording!!!..
No comments:
Post a Comment