Similarities and differences between load testing, stress testing and performance testing

Load testing (Load testing), stress testing (Stress Test, should be called strength testing) and performance testing, these three concepts often cause confusion, difficult to distinguish, resulting in incorrect understanding and wrong use. Before, there were also a lot of discussions, the more famous ones should be classified as two blogs of Grig Gheorghiu's:
     The testing purposes of load testing, stress testing and performance testing are different, but their means and methods are similar to a certain extent. They usually use the same testing environment and testing tools, and they all monitor the resources occupied by the system and other corresponding performance. indicator, which is also the main reason why people are prone to conceptual confusion.
     We know that software always runs in a certain environment, which includes the hardware and software environment that supports the running of the software and the external conditions that affect the running of the software. In order for customers to be satisfied with using a software system, it is necessary to ensure that the system works well and achieves high security, high reliability and high performance. Among them, whether the system has high-performance operating characteristics depends not only on the design and program algorithm of the system itself, but also on the operating environment of the system. The operating environment of the system will depend on some key factors, such as:
  • System architecture, such as distributed server cluster or centralized mainframe system.
  • The hardware configuration, such as the server configuration, the higher the CPU and memory configuration, the better the system performance will be.
  • Network bandwidth, as the bandwidth increases, the speed of the client accessing the server will be greatly improved.
  • The selection of supporting software, such as the selection of different database management systems (Oracle, MySQL, etc.) and web application servers (Tomcat, GlassFish, Jboss, WebLogic, etc.), has an impact on the performance of the application system.
  • External load, how many simultaneous user connections, user upload file size, number of records in the database, etc. will affect the performance of the system. Generally speaking, the heavier the system load, the lower the system performance.
     It can be seen from the above that to achieve the best performance of the system, not only the relevant verification is completed by testing the system in a specific environment, but also the design, code and system design, code and Adjust the configuration, etc. to improve the performance of the system. In many cases, the improvement of system performance is a process of testing, tuning, re-testing, re-tuning, ... a continuous improvement process, which is what we often call performance tuning.
    After understanding such a background, it is easier to understand why load testing is often mentioned in performance testing. From the purpose of testing and the needs of users, it is easier to distinguish performance testing, load testing and stress testing. Performance testing is to obtain the performance index data of the system under certain conditions (including specific load conditions), while load testing and stress testing are to discover problems in the software system, including performance bottlenecks, memory leaks, etc. . Passing the load test is also to obtain the maximum load that the system can bear during normal operation. At this time, the load test becomes the capacity test. Through stress testing, you can know under what limit the system will crash, whether the system has self-recovery, etc., but it is more to determine the stability of the system.
     So, how to define load testing and stress testing? Based on the above discussion, we can give the following definitions:
  • Load testing is a system load that simulates the load conditions borne by the actual software system. Through continuous loading (such as gradually increasing the number of simulated users) or other loading methods, the response time and data throughput of the system and the resources occupied by the system are observed under different loads. (such as CPU, memory), etc., to check the behavior and characteristics of the system to find possible performance bottlenecks, memory leaks, and inability to synchronize in real time. Load testing is more of an approach or a technique.
  • The stress test is a test under a strong load (large data volume, a large number of concurrent users, etc.) to check the operation behavior of the application system under peak usage conditions, so as to effectively discover the hidden dangers of a certain function of the system, whether the system has good fault tolerance and Resilience. The stress test is divided into a long-term stability stress test under high load (such as more than 24 hours) and a destructive stress test that causes the system to collapse under extreme load conditions.
     压力测试可以被看作是负载测试的一种,即高负载下的负载测试,或者说压力测试采用负载测试技术。通过压力测试,可以更快地发现内存泄漏问题,还可以更快地发现影响系统稳定性的问题。例如,在正常负载情况下,某些功能不能正常使用或系统出错的概率比较低,可能一个月只出现一次,但在高负载(压力测试)下,可能一天就出现,从而发现有缺陷的功能或其它系统问题。通过负载测试,可以证明这一点,某个电子商务网站的订单提交功能,在10个并发用户时错误率是零,在50个并发用户时错误率是1%,而在200个并发用户时错误率是20%。
    负载测试是为了发现系统的性能问题,负载测试需要通过系统性能特性或行为来发现问题,从而为性能改进提供帮助,从这个意义看,负载测试可以看作性能测试的一部分。但它们两者的目的是不一样的,负载测试是为了发现缺陷,而性能测试是为了获取性能指标。因为性能测试过程中,也可以不调整负载,而是在同样负载情况下改变系统的结构、改变算法、改变硬件配置等等来得到性能指标数据,从这个意义看,负载测试可以看作是性能测试所c的一种技术,即性能测试使用负载测试的技术、使用负载测试的工具。性能测试要获得在不同的负载情况下的性能指标数据。
    通过负载测试和压力测试都可以获得系统正常工作时的极限负载或最大容量。容量测试,自然也是采用负载测试技术来实现,而在破坏性的压力测试中,容量的确定可以看作是一种副产品——间接结果。
    综合所述,负载测试、压力测试和性能测试的概念可以概括如下:
  • 负载测试是通过改变系统负载方式、增加负载等来发现系统中所存在的性能问题。负载测试是一种测试方法,可以为性能测试、压力测试所采用。负载测试的加载方式也有很多种,可以根据测试需要来选择。
  • 性能测试是为获取或验证系统性能指标而进行测试。多数情况下,性能测试会在不同负载情况下进行。

  • 压力测试通常是在高负载情况下来对系统的稳定性进行测试,更有效地发现系统稳定性的隐患和系统在负载峰值的条件下功能隐患等。
  • 在此向大家推荐一个软件测试的交流Q群哦:672899761

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325563500&siteId=291194637