JMeter
steps
The first step you want to
do with every JMeter Test Plan is to add a Thread Group element. The Thread
Group tells JMeter the number of users you want to simulate, how often the
users should send requests, and the how many requests they should send.
- First select the Test Plan, clicking your right mouse
button to get the Add menu, and then select Add --> ThreadGroup.
- Click your right mouse button to get the Add menu, and
then select Add --> Config Element --> HTTP Request Defaults. Then,
select this new element to view its Control Panel
- Right click on
the “Thread Group” and add a recording controller: Add > Logic
Controller >
Recording Controller
- Next, select
WorkBench
- Right click on
WorkBench and add the Http proxy: Add -> Non-Test Elements -> HTTP
Proxy Server

- Return to HTTP Proxy Server, and click
the “Start” button at the bottom.
Configure your brower to use the
JMeter HTTP Proxy:
At this point, JMeter's proxy is running. For this
exercise, we will use Iceweasel/Firefox to
view some pages on JMeter.
- Start
Iceweasel/Firefox, but do not close JMeter.
- From the tool
bar, click “Edit -> Preferences” (or “Tools > Preferences”). This
should bring
up the options.
- Select the
“Advanced” tab, and “Network” tab
- Click “Settings” button near the
bottom
On the new popup, check “Manual proxy
configuration”. The address and port fields
should be enabled now.
- Address – enter
“localhost” or the IP address of your system
- Port – enter
“8080”.

Record your navigation
- With your brower,
in the “Address” bar at the top, enter
- “http://jmeter.apache.org/index.html” and hit the “enter” key.
- Click on a few
links on JMeter's pages.
- Close your browser
and bring up the JMeter window.
- Click stop in
“HTTP Proxy Server”
- Expand the thread
group and there should be several samplers.
- Select “Thread
Group”
- Right click “Add
-> Listener -> Summary Report” to add an summary listener.
The summary listener will show some basic
statistics.
Start the test
At this point, we are ready to run our test plan
and see what happens. Save the test plan.
When you're ready to run the test, there's two
ways:
1. Run -> Start
2. Ctrl–R
Before you start the test, select “Summary Report”.
As the test runs, the statistics will change
until the test is done. At the end of the test, the
summary report should look like this.
While the test is running, in the upper right-hand
corner, there should be a green square.
When
the test is done, the box should be grey.



No comments:
Post a Comment