Do you know the classification, difference and characteristics of performance testing?

Now performance testing is a hot topic. The reason is that many companies now require testers to do performance testing, so today I will popularize several categories and characteristics of performance testing.

There are several terms about performance testing: performance testing, load testing, stress testing, concurrency testing, many of which are mixed, or sometimes stress testing, sometimes called concurrent testing. In addition to non-testers who can't distinguish these terms, even many professional testers are confused by these terms. The differences and characteristics between these nouns are discussed in detail below.

1. The concept of software performance testing:

The performance test method is to test whether the performance of the system meets the performance requirements of the software by simulating the combination of business pressure and usage scenarios in production operation. In layman's terms, this method is to verify the processing capability of the software system under specific operating conditions.

1) Features of performance test:

(1) The main purpose of the performance testing method is to verify whether the software system has the expected capability of the system.

(2) The performance testing method should understand the specific usage scenarios of the system under test in advance, and have certain performance goals.

(3) The performance test method requires operation in a determined environment.

That is to say, the performance test is a kind of test that is carried out under the premise of having a certain understanding of the system performance, and having a clear target for the requirements, and in a determined environment.

2. Performance load test

By continuously applying pressure on the software system under test, until the performance index reaches the limit state, for example, the "response time" exceeds the predetermined index or a certain resource has reached the saturation state.

1) Features of load testing:

(1) The main purpose of the load testing method is to find out where the limit of the system's processing capability is.

(2) The load test method needs to be carried out in a known test environment, and usually also needs to consider the business pressure and typical scenarios of the tested system, so that the test results have practical business significance.

(3) The load test method is generally used to understand the performance capacity of the system, or to be used in conjunction with performance tuning.

That is, load testing is the constant stressing of a system to see when the software has exceeded "expected requirements" or the system crashes.

3. Performance stress test (also called strength test)

The performance stress test is to test the session capability that the system can handle under a certain saturation state, such as CPU and memory saturation, and whether there will be errors in the system.

1) Features of stress test:

(1) The main purpose of the stress test method is to check the specific performance of the software application when the system is under stress performance.

(2)压力测试方法一般通过模拟负载测试等方法,使得系统的资源使用达到较高的水平。

(3)压力测试方法一般用于测试系统的稳定性。

也就是说,压力测试是让系统处在很大强度的压力之下,看系统是否稳定,注意观察哪个地方会出现问题。

4、性能并发测试

性能并发测试通过模拟用户并发访问,测试多用户并发访问同一个软件、同一个模块或者数据记录时是否存在死锁或其者性它的性能问题。

1)并发测试的特点:

(1)并发测试方法的主要目的是发现系统中可能隐藏并发访问时的问题。

(2)并发测试方法主要关注系统可能存在的并发问题,例如系统中的内存泄漏、线程锁和资源并用方面的问题。

(3)并发测试方法可以在开发的各个阶段使用,不过是需要相关的测试工具的配合和支持。

也就是说,并发测试关注点是多个用户同时(并发)对一个模块或操作行为进行加压的一种测试。

5、性能配置测试

性能配置测试是通过对被测系统的软/硬件环境的调整,了解各种不同方法对软件系统的性能影响的程度,从而找到系统各项资源的最优分配原则。

1)配置测试的特点:

(1)配置测试方法的主要目的是了解各种不同因素对系统性能影响的程度,从而判断出最值得进行的调优操作。

(2)配置测试方法一般在对系统性能状况有初步了解后才进行。

(3)配置测试方法一般用于性能调优和软件处理能力的规划。

也就是说,配置测试关注点是“微调”,通过对软硬件的不断调整,找出软件系统的最佳状态,使软件系统达到一个最稳定的状态。

6、性能可靠性测试

性能可靠性测试是在给系统加载一定业务压力的情况下,使系统运行一段时间,以此检测系统是否稳定。

1)可靠性测试的特点:

(1)可靠性测试方法的主要目的是验证软件系统是否支持长期稳定的运行。

(2)可靠性测试方法需要在压力下持续一段时间的运行。

(3)可靠性测试过程中需要关注系统的运行状况如何。

也就是说,这种测试的关注点是“稳定”,不需要给系统太大的压力,只要系统能够长期处于一个稳定的状态即可。

除了上面的几种分类性能测试,还有一种是失效性测试,就是系统局部发生问题时,其它模块是否可以正常的运行。这个在极少数情况下才会要求进行测试。使用到的情况比较少。

性能测试的分类已经介绍完了,但我们在做性能测试过程中真的能把它们区分的很清楚吗?你能严格区分出你这次的测试到底是并发测试还是压力测试呢?如下举例来说明下这个区分。

拿运动员来说,对于练过几年时间的体育运动员来说,如果参加很多体育项目,其实不论最后参加哪项运动,最终要考核他的就两方面:爆发力和持久耐力。而我们在做性能测试时主要关注的也是这两方面的性能。

1)爆发力: 拿一个举重选手来说,他的能力特点在重量上,因为你只要能举起成功三秒就算你成功了,关键是看你能举起一个多大的重量。

2)持久耐力: 拿一个马拉松运动员来说,你的百米速度跑得再快也没用,关键是在长达40公里远的路程中,第一个跑到终点的人才是赢家。

从上面的举例中回到性能测试话题上,爆发力就是系统能承受的最大压力,可能软件系统刚开始承受的压力很大,但过半个小时之后就挂掉了。持久耐力就是这个软件系统在长时间处于压力下的稳定性,如软件系统很稳定,运行了几十年都不用重启服务器,那么最后就是看系统有没系统瓶颈(短板),并对其进行系统调优即可。

End,今天主要是普及下软件性能测试的分类和其特点的描述,希望能让还对软件性能测试还比较迷糊的同学们一个观点明确的帮助。

如果大家还有测试方面的问题欢迎一起交流学习:672899761。

Guess you like

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