Вы находитесь на странице: 1из 8

Prerequisites:

Jmeter application is installed

Jmeter plugins installed:

o JMeter Plugins Manager (installation instructions here: https://jmeter- plugins.org/wiki/PluginsManager/)

Below plugins can be installed Plugins Manager from Jmeter

o

jpgc - Standard Set

o

JMXMon Sample Collector

o

PerfMon (Servers Performance Monitoring)

Your browser is configured to use JMeter Proxy

Configure your browser to use the JMeter Proxy

For below exercises we will use Mozilla Firefox. You may use other browsers but for that you will need to configure it to use JMeter proxy.

Open Firefox > Open Option > Advanced > Select Network > Click on Settings (under Connections) > Select ‘Manual Proxy Configuration’

HTTP proxy should have localhost value and Port: 8080 (you may use other port if 8080 is in use).

Use this proxy server for all protocols option must be checked

Click OK and close mozilla firefox

must be checked • Click OK and close mozilla firefox Notes: • about same steps can

Notes:

about same steps can be followed for other browsers.

disable manual proxy configuration once you are done with Jmeter to be able to access internet connection again.

Page 1 of 8

Basic Instructions

Start JMeter

- Go to JMETER_HOME/bin and start JMeter with jmeterw.cmd or jmeter.bat on Windows and jmeter.sh on Linux/Unix

- JMETER_HOME is location where you unpacked the apache jmeter archive

Start ServerAgent

- Go to ServerAgent location on the disk and start it with startAgent.bat on Windows and startAgent.sh on Linux/Unix

Exercise 1: The exercise presented by Ancuta during the class (with blazemeter demo site)

1. Start JMeter

2. Select Test Plan on the tree

3. Right click on the Test Plan and add new thread group: Add > Threads (Users) > jp@gc Stepping Thread Group

Threads (Users) > jp@gc – Stepping Thread Group 4. Right click on the jp@gc – Stepping

4. Right click on the jp@gc Stepping Thread Group and add a new controller: Add > Logic Controller > Recording Controller

Page 2 of 8

5. Select WorkBench 6. Right click on WorkBench and add the recorder: Add > Non-Test

5. Select WorkBench

6. Right click on WorkBench and add the recorder: Add > Non-Test Elements > HTTP(S) Test Script Recorder

> Non-Test Elements > HTTP(S) Test Script Recorder 7. Set global settings: Click on HTTP(S) Test

7. Set global settings: Click on HTTP(S) Test Script Recorder, on the right panel set

port number (the value should be the same with the one provided during proxy settings in browser)

HTTP Domains to localhost

Target Controller: Test Plan > jp@gc Stepping Thread Group > Random Controller

Page 3 of 8

Proceed with recording 8. Pres Start button from bottom of the HTTP(S) Test Script Recorder

Proceed with recording

8. Pres Start button from bottom of the HTTP(S) Test Script Recorder

9. Open Firefox

11. Click on Find Flights button (optional you may select different departure city and destination city)

12. Choose a flight and press Choose This Flight button

13. Go to the reservation page and click Purchase Flight button (optional you may introduce our data in the reservation page form)

14. Close browser

15. Stop recording Recording is now complete. You should be able to find all calls recorded (in this scenario you should have 4)

is now complete. You should be able to find all calls recorded (in this scenario you

Page 4 of 8

Prepare the test for execution

16.

16. than 5 users, you will be banned)
16. than 5 users, you will be banned)

than 5 users, you will be banned)

Select and configure jp@gc - Stepping Thread Group as in below image

(please do not add more

Thread Group as in below image (please do not add more 17. Right click Add >

17. Right click Add > Listener > Aggregate Report to add a aggregate report listener

add more 17. Right click Add > Listener > Aggregate Report to add a aggregate report

Page 5 of 8

18. Right click Add > Listener > jp@gc - Response Times Over Time to add an aggregate report listener

Times Over Time to add an aggregate report listener 19. Right click Add > Listener >

19. Right click Add > Listener > jp@gc - PerfMon Metrics Collector.

20. Click on jp@gc - PerfMon Metrics Collector

21. Click on Add Row and add following metric to collect:

- CPU User

- CPU System

- Memory Used (select megabytes)

- Network I/O rx,

- Network I/O, tx

to collect: - CPU User - CPU System - Memory Used (select megabytes) - Network I/O

Page 6 of 8

22. Save the Test Plan. I recommend to create a folder where to store the test plans.

23. Start ServerAgent – if this is not started the test will have a lot
23. Start ServerAgent – if this is not started the test will have a lot

23. Start ServerAgent if this is not started the test will have a lot of errors. If you have issues with

the test will have a lot of errors. If you have issues with it you should
the test will have a lot of errors. If you have issues with it you should

it you should disable jp@gc - PerfMon Metrics Collector (right click on it and select disable)

Execute the test

24. Press Start button (green ones). The test will run for 1 minute and 18 seconds.

(green ones). The test will run for 1 minute and 18 seconds. During the test execution

During the test execution you may access from time to time the Aggregate report, jp@gc - Response Times Over Time and jp@gc - PerfMon Metrics Collector. You will see live data and graph.

Tips:

Pressing CTRL+E will clean up the results for a new test

You may save the test results and watch them later

Save the test plan often to avoid losing work

Play with data collected during the tests: i.e. for PerfMon Metrics yo may go to Rows tab and select only networking and you will see how the traffic grows during the test.

Page 7 of 8

Exercise: How would you report the data collected? Can you give us details about the server response time and client resource utilization?

Page 8 of 8