Double click the Program Menu item. This new screen will bring up the external tools menu items. So far, I’ve named my External Tool ‘AB Load Testing’ and filled in the path to my ab.exe and working directory.
For this setup, I’m going to stick with concurrency and with number of requests. You may want to swap out the -n
option with the -t
.
Add in the -c
argument.
You’ll notice that you have the option to click on variables. Eclipse has the ability to prompt for variables, so we’ll set these settings interactively. (You may find that you will end up creating some standard tests that do not require prompting, but for this exercise we’re going to make it very interactive.)
Click the Variables button.
Scroll down until you see string_prompt
and select it. You’ll notice that the arguments that you can specify are the prompt text and the default value. Fill in your prompt text and default value separated by a colon in the arguments box.
Repeat the process with the -n option. I selected -n ${string_prompt:Number of requests?:40}
.
Finally, create the prompt for the URL to test. (Remember, like I said, you might end up creating these more scripted by hard-setting these values in the future.) I selected ${string_prompt:URL to test?}
.
Click the Common tab, check external tools under the favorites menu.
Click Apply, Click Close. This saves your external program.
Click the external tools drop down and select AB Load Testing.
You should start to receive your prompts. Fill in the items as appropriate.
And, as you can see, after it is completed, you will see the output in the console.
For example, my output was this:
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: Apache/2.2.3
Server Hostname: localhost
Server Port: 80
Document Path: /loadtest.php
Document Length: 3 bytes
Concurrency Level: 4
Time taken for tests: 6.62500 seconds
Complete requests: 40
Failed requests: 0
Write errors: 0
Total transferred: 7480 bytes
HTML transferred: 120 bytes
Requests per second: 6.60 [#/sec] (mean)
Time per request: 606.250 [ms] (mean)
Time per request: 151.563 [ms] (mean, across all concurrent requests)
Transfer rate: 1.15 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 109 560 315.0 609 1000
Waiting: 109 560 315.0 609 1000
Total: 109 560 315.0 609 1000
Percentage of the requests served within a certain time (ms)
50% 609
66% 703
75% 812
80% 906
90% 1000
95% 1000
98% 1000
99% 1000
100% 1000 (longest request)
Do you have any other cool ways of customizing this external tool?