During the development of web program, some pressure tests often need to determine the actual performance of the current page. This tool has a lot of tools. There is an OpenSTA (Open System Testing Architecture) of the development source code, and there is also a familiar Etest, this Both tools can be pre-recorded in advance, such as your use of username, password login, browse page, access toum, etc., you can make a test loop, then you can simultaneously send 100 times or 1000 times, this is mainly Your machine performance, but according to my experience, the same configuration Etest is less memory, of course, Etest is a negative fee, huh, if the general application can use OpenSTA. I use E- Test Suite 7.0 (IE6), including E-Test (recording editing test scripts), E-load, etc., only describe E-Test and E-LOAD, the E-Test interface is as follows, there are several toolbars The button is often used, recording script, stopped, playback script, data bank wizard, as long as the mouse is placed on the toolbar, you can find 1, Recording the test script Enter the URL address you want to test in the address bar. After the page returns, click the Record button, you can record your operation (do not use the Enter, click the Submit button using the mouse), with your operation, Your operation information will appear in the script bar on the left side, the page display, including details such as cookie, form, html, such as cookie, Form, HTML, etc. After the operation is completed, click the Stop button, click the save button, record the work It is done, get a script now you can click the playback button, you can see the playback of your recording, after playback, it will provide a playback report, including the page time, and error warning. If there is a problem, you can restart the new script, or you can delete the error page, record the new page to this script (it is recommended to do it, it is easy to have an inexplicable problem). This will solve the problem of simple repeat tests, but if the operation does not have repeatability, such as simulating 1000 different users login, or simulate the consumption of certain e-commerce websites (such as card recharge, the need for each test The card number), then we need the function of the data bank. 2, Data Bank E-Test Suite's data bank function is very powerful, you only need to correspond to a text file in Form, you can manually edit this file, in the test playback, you can choose a different record each time you choose In the pressure test, you can assign a certain number of records for each virtual user, and allow them to perform one or more loops, using this feature, you can easily simulate 1000 different users login You can also simulate 1000 users to recharge 10,000 point cards. At the same time, E-Load will provide a very detailed pressure test report. You can know that 1000 users will log in to the successful percentage, you can also know how much 10,000 card recharge Time, how much is the probability of error, ok, let's take a look at this fascinating function.
Click the Data Bank Wizard button to get a list of values in the FORM of the current script. If you have 5 FORM values in my script, you can use the user name, password, verification code, card number, password, and data bank binding function. The relationship is the parameter -> variable -> Data bank domain, we can manually add variables, bind, or click on the automatic mapping, automatic binding button, from the action, here I use the automatic operation function, then manually adjust, the picture below The result of the mapping result is as follows. The data now displayed is the data I entered when I recorded the script. Click the Edit button to display a notepad scripte1.csvname, PWD, Authno, Cardid, Passwordflysyq, XXXXXX, Rrrrr, 09990000620150, Msaddiom this The file is automatically generated, you can edit this file, add its number of records in the binding page you can see that you are using the first few lines in the data file, if you need to use a different record, you want to click Unique Variables Per Page check box Click OK Save. Then select Options-> New Script (Script1) -> Playback-> Script-> Data Bank checkplay playback with data bank, select Use All Records, save the script below, play back the script, the script will loop the value in the DataBank, The Data Bank your test is complete. 3, Pressure Test (E-LOAD) Open E-LOAD, you can see your defined script, I am Script1, set the number of virtual users is 100, we simulate 100 user pressure tests, as other settings below A lot, you can refer to its help, here you don't say, click Submit Scenario, submit your settings in the automatic run setting, I don't do any modifications, the default is immediate, never stop, every time you start 10% of the virtual users, the interval is 5 seconds, you can also modify these parameters, I select Run-> Autopilot-> Data Bank Control as shown below, you will display the data bank you set
Click Prefernces to set up 100 records of each customer, stop (avoid useless operation), as shown below
Click OK to determine! Autopilot Click Start, you can test it, you can take note of its test results and monitoring reports, and after the end of the report, you have to study slowly, huh, huh!