1, open the Apache Server installation path, in the bin directory has a ab.exe executable program, is we want to introduce the stress test tool.
2. Under the command line of Windows system, go to the directory where the Ab.exe program is located and execute the Ab.exe program. Note the direct double-click does not work correctly.
3, after the successful execution of the AB command, you can see that the help is very clear and detailed introduction of the use of AB and the meaning of each parameter. AB's usage is: AB [options] [http://]hostname[:p ort]/path Example: Ab-n 5000-c http://localhost/api.action The above example indicates a total of access/HTTP/ Localhost/api.action this script 5,000 times, 200 concurrent execution concurrently.
AB Common Parameters Introduction:-N: A total number of request executions, the default is 1;-c: Concurrency number, the default is 1;-t: The total time of the test, seconds, the default 50000s-p:post when the data file-W: Output results in the format of the HTML table execution test cases: Ab-n 1000- C 100-w http://localhost/api.action >> f:\1.html The above test cases represent 100 concurrent cases, the total test accesses the index.php script 1000 times, and saves the test results to f:\1. The HTML file.
How to use Apache's AB tool for website performance testing