Use of the stress testing tool Etest

Source: Internet
Author: User

In the web program development process, some stress tests are often required to determine the actual performance of the current page. There are many tools in this regard, including the opensta (Open System Testing architecture) of the development source code ), there is also the familiar Etest, which can be used to pre-record page operations. For example, you can use the user name and password to log in, browse the page, visit the forum, and other actions to create a Test Loop, then we can run this loop 100 or 1000 times concurrently. This mainly depends on the performance of your machine. However, according to my experience, the same configuration of Etest requires less memory, of course, Etest is charged, huh, if the general application, you can use opensta.

I am using e-test suite 7.0 (IE6), including e-test (recording and editing test script), E-load (stress testing) and other functions, here we will only introduce e-test and e-load. The e-test interface is as follows. There are several buttons on the toolbar that will be commonly used: Record script, stop ), playback script (playback script) and Data Bank wizard (run data bank wizard). You just need to move your mouse over the toolbar and check the prompt.

1. Recording test scripts
Enter the URL address you want to test in the address bar. When the page returns, click the recording button to record your operations (Do not press Enter. Use the mouse to click the submit button.), Your operation information will appear in the script bar on the left, displayed on pages, including detailed information of each page, such as Cookie, form, HTML, etc, as shown in

After the operation is complete, click "Stop" and click "save" to complete the recording. A script is displayed.

Now you can click the playback button to view the playback of your recorded operations. After playback, it will provide a playback report, including the page time and error warning. If there is a problem, you can re-create a new script, or delete the error page and record the new page to this script. (We recommend that you do not do this, it is prone to inexplicable problems ).

This can solve the problem of simple repeated tests, but if the operation is not reproducible, such as simulating login of 1000 different users, or simulating the consumption of some e-commerce websites (such as card top-up, the data bank function is required for each test.
2. Data Bank
E-test suite's Data Bank function is very powerful. You only need to map the data box in the form to a text file, you can manually edit this file, in the test playback, you can select different records each time. In stress testing, you can allocate a certain number of records to each virtual user and let them execute one or more cycles, with this function, you can easily simulate the login status of 1000 different users, or simulate the situation where 1000 users recharge 10000 cards, at the same time, e-load will provide a very detailed stress test report, you can know the percentage of 1000 users logging on successfully at the same time, you can also know how long it takes to complete the 10000 card recharge, what is the probability of an error? Well, let's take a look at this compelling feature.

Click the data bank wizard button to obtain the list of values in the form of the current script, as shown in

My script has five form values, which are username, password, verification code, card number, and password. the correspondence between the binding function of data bank is parameter-> variable-> Data Bank domain, you can manually add and bind variables, or click the auto- ing and auto-binding buttons to perform automatic operations. Here I use the auto- ing function and then adjust it manually.

The automatic ing result is as follows,

The displayed data is the data that is recorded at the time of recording. Click edit to display a script scripte1.csv
Name, PWD, authno, cardid, password
Flysyq, xxxxxx, rrrrrr, 09990000620150, msaddiom

This file is automatically generated. You can edit this file and increase the number of records.

On the BIND page, you can see the rows in the data file. To use different records for each page, click the check box of unique variables per page.

Click OK to save.

Select Options> new script (script1)> playback> SCRIPT> data bank to check playback with data bank and select use all records, as shown in figure

Save the script and play back the script. The script cyclically retrieves the value in databank, and the data bank of your test is complete.

3. Stress Testing (e-load)

Open e-load and you can see the script you defined. My name is script1 and the number of virtual users is set to 100. We simulate stress testing for 100 users, as shown in figure

There are many other settings. You can refer to it for help,
Click Submit scenario to submit your settings.

In the automatic operation setting, I did not make any changes. The default value is immediate execution, never stop, and 10% virtual users are started each time. The interval is 5 seconds, you can also modify these parameters, such

Select Run> autopilot> data bank control to display the data bank you set.

Click prefernces to set each customer to cache 100 records. Once the record is used up, it is stopped (to avoid useless operations), as shown in figure

Click OK!

Autopilot click Start to perform a stress test. You can check the test results, monitoring reports, and reports after the completion of the test. You have to study them slowly!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.