Using Python for site stress testing under Windows, there are two essential programs that need to be installed, one Python and the other pylot. Python is an installation software that runs a Python program, while Pylot is a Python plug-in that acts as a site stress test. This article describes how to use Python Pylot for site stress testing under Windows.
First, install Python
If you have successfully installed Python, you can ignore this step. Otherwise, please install Python correctly first, and make sure it works properly. As you can see here, the Windows installation Python detailed tutorial environment variable setting is critical.
Second, download Pylot
Pylot is an open-source Web performance testing tool that can be used as a Python plug-in for Web stress testing. Is:
Http://pylt.googlecode.com/files/pylot_1.26.zip
third, the use of Pylot
1, after downloading Pylot, unzip to a directory, for example: C:\pylot_1.26, no installation.
2, Configuration Testcases.xml
In the pylot_1.26 folder, you will see a testcases.xml file, we need to change this file, use Notepad to open it, the need to test the Web address to add in.
<testcases>
<!--SAMPLE TEST case---
<case>
<url>
Enter the Pylot directory
Enter the following command:
Python run.py-a 100-d 20
Explanation:-A indicates concurrent 100 client connections, and-D indicates a 20-second continuous run time
At this point, you will see the Python run interface (I'm demonstrating concurrency 20, running time 10 seconds),
Python pylot Stress test
If you see something like the above, it means the test is over. (If there is no information, it may be too many concurrent numbers, the number of concurrent changes to try, such as only 20, not all of a sudden concurrent 1000)
At the end of the test, a "results" folder is generated in the Pylot file directory, and a results.html file is generated, which records the detailed test data. We can go into the results directory, open this file and see my test results:
Http://www.webkaka.com/Blog/ARCHIVES/demo/pylot/results.html
Pylot the data generated by the stress test
question: Why doesn't the graphics show up in the test results?
The results of the test are prompted to see:
Python pylot stress test generates graphics failure
Generating Results ...
Generating Graphs ...
Matplotlib Importerror:no module named Pylab
Error:unable to generate graphs with matplotlib
So, to test the results to get the relevant graphs, but also to install NumPy and matplotlib These two plug-ins, please refer to the article: Windows pylot+matplotlib pressure test to generate a chart file.
A sample of the Pylot pressure test report containing the graphs can be seen here:
Http://www.webkaka.com/Blog/ARCHIVES/demo/pylot/results_graphs.html
(looks more professional, more beautiful.) ^-^)
Editor
Web site stress testing generally need to install some software in this machine, some also have to carry out complex configuration, software installation, but also to study tutorials, learn how to use, to many people to add a lot of trouble. Now Kaka Network launched a website pressure online testing tool (address is http://y.webkaka.com/), directly on the Internet can be tested, if you also have trouble installing software, then you can try the online test card network.
Detailed introduction to using Python Pylot for site stress testing under Windows