Performance test using Web Application Stress Tool (WAS) (3)

zhaozj2021-02-16  70

Performance test using Web Application Stress Tool (WAS) (3)

Establish each client machine

WAS allows you to use multiple client machines to test your website. When a test begins, WAS will automatically contact all clients to transfer all test information (including test scripts, page groups, user-defined information), start and stop their tests, and collect test results.

Use one of the client machines as your primary client. This primary client should be you used to record and set up a test script.

Establish test client

1. Expand script information on the left window

2. Click the CLIENTS node to open the appropriate view on the right window

3. Double-click the DEFAULT client to open the client view

Local client records (main clients you work) have been created by default.

4. To add a new client, enter an IP address or domain name in Machine Name.

5. Point Add button, the new client will be added to the form with the status of Connected.

6. Repeat steps 5 and 6 until all client machines are added.

When adding a new client, try to add a machine that is substantially the same. We have found that a machine that is significantly smart is more than other machines, which does not add it to generate more Socket errors.

We also found that if we set a focused machine as the primary client, this machine does not participate in the production load. Such settings we will produce few Socket errors, and the test is faster.

To set this, remove the name of the primary client from the client list. If you have a slow machine and you don't plan to use your load to generate a machine, it can be used as your main customer end without affecting the output output. Note that this main client still does all the work of generating reports and distribution test scripts. A slow-speed primary client means that your test start and end speed will be slow, and more time will be reported.

Set up performance counters

WAS can combine the collection of test data with the Windows NT Performance Monitor. You can store your favorite performance monitoring counters for each script, and WAs collect their data like other information.

Add Performance Monitoring Course to your script

1. Expand the information of the script on the left window

2. Open the appropriate view on the right window point PERF Counters node

3. In Collection Interval, enter the collection time interval. This is the sample time calculated in seconds.

4. Point Add Counter button

5. From the Add Counter to Report dialog, select the machine, object, and you interested in the collected counters.

There is a series of universal performance counters in the "CommON Performance Monitor Counters" section of the WAS Help file.

If you encounter something when you use this feature, please refer to the basic knowledge of WAS.

Run test script

Once you set the test script, you are ready to run the script in your client.

Start the test of the primary client

1. Scripts you need to test

2. Select Run from the Scripts menu

You can also run the script on the PLAY button on the toolbar.

Check test report

After the test is complete, you should check the test report to see if there is a socket or http error

Check these errors from the report

1. Open the appropriate view from the View menu Selected Reports, see Figure 7.

Figure 7. Reports View Screen2. On the left window, double-click the script to open the test report, if needed

3. Tap the test report name (with test runtime specified), if needed. You will see a summary of the report to the report.

4. In the report summary, check if the Socket Errors section has any socket-related errors (not 0). The explanation of each Socket error is listed here:

• The connection number of connectors cannot be connected to the server. If this value is high, check any potential errors generated between the client and the server. Verify that you get the correct response from the port 80 of each client PING server or Telnet server.

· The Send-Client does not send data to the server correctly. If this value is high, check whether the server works correctly. Open a browser on the client and then manually click on the site page to verify the site correctly.

· The RECV-client does not correctly receive data from the server. If this value is high, the same operation is the same as the SEND error. Also check if you reduce the load factor, whether the error is reduced.

· Timeouts - the number of times the thread, and then turn it off. If this value is high, open a browser on the client and then manually click on the site page to verify that even if there is only one user, you will be very slow. Do a pressure test of different load factors to see the potential characteristics of your program.

5. If the socket error is very low or 0, the report view is pulled to find the Result Codes section.

6. Check if all result code is 200, indicating that all requests have been successfully returned by the server. If the result greater than or equal to 400 is found, continue the following steps to find which script item (URL) generates these HTTP errors.

7. Expand script information on the left window

8. Double-click the Page Data node to expand all scripts

9. Click on each script to see the report of page data on the right window

10. Check the Result Codes section in each script, verify that there is an HTTP error. If you want to see a list of common result code, please refer to the "HTTP Result Codes" section of the WAS Help file.

Run the script

After you are ready for test scripts, you can now prepare to run test and collect data.

You can manually run each test by step as described earlier. However, this will be a time consuming process.

WAS has an object model that allows you to create your own Microsoft Visual Basic Scripting Edition (VBScript) script to control and configure the test run.

When testing runs, you should monitor and record different performance-related system counters, including tracking system throughput counters, reaction time, and resource utilization.

Conclusion: The best habits

Customer machine. Close monitoring system resource utilization of each client. If the CPU or memory is used above 80%, the client may have already overloaded, you should consider using more client machines to test. The oppression client machine can cause unreliable results and generating a Socket error when connecting to the server.

Set multiple layers to the server. It is estimated that the maximum number of users requested concurrent requests in order to push your web server group to 100% in the preparation test.

When there is not enough client machine to enable the server group to reach the limit, you need to set a higher load multiple, for example, if you find 4,000 threads, multiply the load factor, you still can't push the server to the limit If the load factor is increased. However, using a load factor greater than 1 will produce a TTLB of the Inifferent WEB Program Page. If possible, adding more machines is better than increasing the load factor. Use session tracking. Use the session track to record the detailed connection between the WAS and the web server. When defining a new WAS script, make sure all URLs work normally and the web server returns to the results you need. If not, it is very likely that you get improved performance results, but the web server returns to the wrong response.

You should set the sessionTrace 1, type is REG_DWORD. SessionTrace Thread Tracking can be registered in the registry / hkey_local_machine / software / microsoft / was. Finally, remember to turn off SessionTrace (0) after confirming the new script, otherwise your disk will be full.

Monitor the log file of the web server. To prepare to redeploy or clear your web server log file. Too many performance tests make it expanded quickly, especially for long-term tests. You can also help you check the application errors for the WAS report as a fault inspector.

Limit the number of items and the number of users of the script. Avoid creating more than 1000 scripts or users unless there are more than this number of objects. Although the number of allowable number is determined by the client's memory, you will find that so many scripts and users will cost too much time.

Track the HTTP redirection option. If the script has recorded a redirected URL, do not use this option. If you use this option, the redirected page will calculate twice.

user name and password. The WAS help file says that the username and password fill the form to specify the method of each WAS user. Using UserName and Password during our testing will greatly increase the time to close the scripts of each client. Some internal users of some WAS are recommended, we specify the user and password name-value in querystring. With the order access mechanism for the User and Password settings, we guarantee that the password is always corresponding to the username.

In addition to some of WAS, WAS is a good tool to simulate users using your website before you publish your website. Use performance test tools to have an important role in successful website programs. These tools allow you to know the performance characteristics of your program, then you will know how your procedure will perform in high load conditions. The more surprising you get in the process of operating the website, the more reliable your site.

Note: Original text

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnduwon/html/d5wast_2.asp

转载请注明原文地址:https://www.9cbs.com/read-23078.html

New Post(0)