Jmeter : Easy Configuration
Open Jmeter :
- Make sure Jmeter is downloaded and JDK is configured in your system(Follow the link below:
- Goto folder where Jmeter is extracted. > Bin .
- Double click on Jmeterw.cmd (for windows ) , jmeter.sh (for Linux)
- Optional : terminal > sh jmeter.sh
REST applications :
- Rt Click on Testplan > Add---> Thread Users ---> Thread Group.
- Thread Group >
- rt ck >Add > Sampler> http request
- name: any name
- Server : endpoint only
- port : port only
- request type : Eg- POST
- path : resource
- body Data: json
- rt ck > Add > Config > http Header Manager
- Add
- Name=Contenty-Type , Value= application/json
- rt ck > Add > Assertions > Response Assertions
- Fields to Test = Response Code
- Patterns to Test > Add > 200
- rt ck > Add > Listener
- Summary Report >filename > path/summary.csv
- Results Table >filename > path/table.csv
- Results Tree
- Response Time
- Aggregate Time >filename > path/aggregate.csv
- Run the setup
- summary report , aggregate Graph > ck on Save Table Data button
- You can also co to thread group add
- Change Number of Threads
- Rampup period [Optional]
Performance parameters :
- Results Table
- ThreadName = loopnumber - ThreadNumber
- Label :Request Name
- Sample Time : Request+Response
- Status : Assertions Pass or Fail
- Bytes : Bytes Received by Jmeter
- Sent Bytes : Bytes Sent To server
- Latency : Time Jmeter needs to wait after sending request till the response is received
- Aggregate Graph
- Samples : Number for Requests
- Averge : Average time request+Response
- Median
- 90% Line : Req + Response time for 90% of samples
- 95 % line : Req + Response time for 95% of samples
- 99% line : Req + Response time for 99% of samples
- Min : least Req+Response time
- Max : highest Req+Response time
- Error : Assertion Fails
- Throughput : number for requests made per second by Jmeter
Performance Testing for UI testing Applications :
Once Jmeter is opened
- Rt Click on Testplan > Add---> Thread Users ---> Thread Group.
- Rt Click on Thread Group > Add --- > Logic Controller ---- >click on recording Controller
- Rt Click on Thread Group > Add --- >Config Controller --- >click on Http Cookie Manager
- Rt Click on Thread Group > Add --- >Config Controller --- >click on Http Request Defaults
- Rt Click On work bench > Add --- > Non test Elemenets --- > click on Http Test Script Recorder.
- Http Test Script Recorder >Port ="8080"
- Click On Http Request Defaults >Server name "http://in.yahoo.com/"
- Click on Http Test Script Recorder > Https Domain "http://in.yahoo.com/"
- Http Sample Settings >Type > HttpClient4
- Url pattern to exclude > Click on add suggested excluded
- Open FireFox Browser.
- Goto Tools >options >Advanced >network>Click on Settings .
- Select Manual Configuration : Http Proxy ="localhost" and port="8080"
- Click on OK
Now the Jmeter and Browser is Configured
- Open Jmeter> Goto Https Test Script Recorder >Click on Start button.
- Open FireFox.
- Paste URL "http://in.yahoo.com/"
- Do any operations on the webpage .
You will see the transaction getting recorded.
Note :
While playing the recorded script make sure you add a "View Results Tree" Element to your Testplan not to your workbench.
If you do not see any recording please see the detail installation below :
No comments:
Post a Comment