Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Software testers must know! How many steps does the stress test take? Summary of ideas

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In the operation and maintenance work, stress testing is a very important work. For example, before the launch of a website, how much traffic it can withstand and how it performs in the case of large traffic, these data indicators will directly affect the user experience. Today let's take a closer look at stress testing!

First of all, what is stress testing?

Software stress testing is a basic quality assurance behavior, and it is a part of every important software testing work. The basic idea of software stress testing is very simple: not to run manual or automatic tests under normal conditions, but to run tests under the conditions of a small number of computers or lack of system resources. Resources that typically perform software stress testing include internal memory, CPU availability, disk space, and network bandwidth.

Stress testing covers performance testing, load testing, concurrent testing, and so on, and these test points are often intertwined and coupled.

As the name implies: stress testing, that is, the system being tested, under certain access pressure, to see whether the program runs stably / the server runs stably (resource usage).

For example, if 2000 users shop on a shopping site at the same time, whether the speed at which they open the page will slow down, or whether the site will collapse.

Steps for stress testing

(1) determine the size of the stock data (users will generally require the production of 3-5 years of stock data)

(2) identify businesses that require stress testing (usually those that are most frequently used by users or where business operations are complex)

(3) determine the number of operating users and the proportion of various operating users

(4) requirements for peak traffic (usually the maximum number of transactions to be processed in an hour)

(5) requirements for real-time business response time (such as the processing time of a single business in peak cases (such as less than 60 seconds))

(6) the time requirements for batch processing (such as the time for day-end (month-end, year-end) processing and batch data transmission with external systems).

The above information usually needs to be determined by the business staff.

In order to make technical preparations for stress testing, the following information is required:

(1) system outline design (understand the technical architecture of the system, determine the test method)

(2) if you develop your own interface program, you need to understand the interface message specification.

(3) database design (we need to write programs based on this to prepare stock data).

In order to develop scripts, you need to know the following information:

(1) Operation manual (script entry or manual development script)

(2) Parametric script (dynamic data needs to be associated)

(3) script playback (verify whether the script can successfully create data).

Test scenario:

(1) single user running stress test scenario

(2) start tuning tasks such as multi-user running test scenarios and viewing system resource consumption.

In addition, there are things about the test environment that need to be implemented. Stress testing generally requires a high configuration of the environment, preferably consistent with or close to the production environment.

Several popular stress testing tools

(1) JMeter

Apache JMeter is a Java-based stress testing tool developed by Apache, which is used for stress testing of software. It was originally designed for Web application testing, but later extended to other testing areas. It can be used to test static and dynamic resources such as static files, Java applets, CGI scripts, Java objects, databases, FTP servers, and so on.

JMeter can be used to simulate huge loads on servers, networks, or objects to test their strength and analyze overall performance under different stress categories.

In addition, JMeter can perform functional regression tests on applications and verify that your program returns the desired results by creating scripts with assertions.

For maximum flexibility, JMeter allows you to create assertions using regular expressions.

(2) LoadRunner

LoadRunner is an automatic load testing tool owned by Hewlett-Packard, which can predict system behavior and optimize performance. LoadRunner emphasizes the enterprise-wide system, which helps to identify and find problems faster by simulating the actual user behavior and implementing real-time performance monitoring. In addition, LoadRunner can support the broadest range of protocols and technologies and provide solutions tailored to its needs.

(3) other testing tools

Siege is an open source stress testing tool that allows multi-user concurrent access to a WEB site according to configuration.

Record the corresponding time of all request processes for each user and repeat them with a certain number of concurrent visits.

TCPCopy is a request replication (all tcp-based packets) tool that imports online requests into the test system.

The characteristic of TCPCopy is that it can copy real online traffic and simulate user data.

Finally, the difference between software stress testing and performance testing:

The difference between the two lies in their different testing purposes.

The purpose of software stress testing is to find the maximum load that the system can support, and its premise is that the system performance is within an acceptable range, such as a response within 3 seconds of a page that is often specified.

So the summary is: under the premise of acceptable performance, the maximum load that the test system can support.

The purpose of software performance testing is to check the performance indicators such as system reflection and running speed, and his premise is that under a certain load, such as checking the performance index of a website when 100 people are online at the same time, whether each user can still complete the operation normally, and so on.

The summary is: under different loads (with a certain load), check the operation of the system through some system parameters (such as reaction time, etc.). For example, we say that the performance of a website is poor, strictly speaking, when N people are online at the same time, the performance of this site is very poor.

In short, it's like an equation: comprehensive performance = pressure number * performance index

The overall performance is fixed:

The purpose of software stress testing is to get the maximum pressure number of the minimum performance index (the minimum acceptable index), and the software performance test is to get the performance index under the pressure number.

Summary:

Before the project is launched, we need to do stress tests to see how much stress our website can withstand and how much concurrency we can bear. If we do not do stress tests, once there is a large number of visitors, our website will fail. So stress testing is really important and should be taken seriously!

Welcome to join the 51 software testing family, where you will get [latest industry information], [free test tool installation package], [software testing technology], [job interview skills]. 51 learn and grow with you! Looking forward to your joining: QQ Group: 755431660

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report