Performance Testing - Introduction

First, performance testing tools comparison

Here Insert Picture Description

Second, the definition of performance testing

  • 1. What is the performance testing
    a system made out, function on the customer requirements specification could have been implemented correctly, this just shows that the system can work, but is doing well yet to be verified, referred to here, "do of how "it can be simply understood as the performance of the system
    such as a system performance requirements: Mail systems can on a single core CPU, 512MB memory server that supports 1000 simultaneous users registered, handling an average of 20,000 messages, development time is not more than 5 seconds / seal
  • 2. What is the performance of the test system?
    Performance testing, refers to certain software, hardware and network conditions to simulate a variety of normal and abnormal peak load conditions by testing tools to test the system performance, which found the system performance bottleneck
    that is to say, through a variety of test strategies, usage scenarios simulate real users, verify that the system can "doing well"

Performance testing concepts and objectives

Performance testing
in terms of time, resource utilization aspects, in order to simulate the real test of these two aspects of the production environment to test (the performance test system)
through automated testing tool simulation

Performance testing purposes:

  • 1, competency assessment system
  • 2, the system to identify weaknesses
  • 3, system tuning
  • 4, verify the stability and reliability

Here Insert Picture Description

Get performance test method

1、开发过程相关文档:项目开发计划、需求规格说明书、设计说明书等
2、相似项目性能需求:公司的其他产品或项目类基础一些数据。比如技术论坛一个小时最多发1000新帖,博客平均每天新增800篇以这些数据为新项目需求的基础
3、业界公认的标准:如响应时间2-5-8标准,用户可容忍的时间
4、用户使用模型:分析用户的使用模型是获取性能测试需求的有效手段,即定义系统的典型使用方式,考虑哪些用户使用系统的那些典型业务,有什么时间段和用户数量的估计值
a、如QA系统每天早上8:00会有200个用户10分钟内登录系统,每天查询的高峰是在9:00到11:00和下午的14:00到16:00

TPS和并发数是有关联的,可以根据TPS换算出并发数(用户要求达到TPS/单用户TPS 估算出所需要的并发数)
2/8原则:百分之80的业务在百分之20时间内完成
1、用户要求达到TPS(根据调研半年或一年的数据,可以统计出:比如合同创建日峰值为2956条,根据二八原则统计出每小时的峰值数据为(295680%) /(2420%) 条/时 = 0.137条/秒)那么历史峰值(TPS)就位0137,预计今年峰值TPS为0.15
2、单用户TPS估算(估算单场景平均执行一次时间如合同创建执行一次的时间为3分钟,那么单用户的单用户 TPS=1/(3*60))

性能测试的常用术语

1、并发用户
并发分为狭义和广义两类

  • 1、狭义并发(绝对并发),即所有的用户在同一时间内做同一件事情,这种操作一般针对同一类型的业务或者所有用户进行完全一样的操作,目的是测试数据库和程序并发操作的处理,狭义并发强调对系统的请求操作是完全相同,多适用于性能测试,负载测试,压力测试
  • 2、广义的并发(相对并发),即在同一个时间段内,做相同或不同的事情。
    对web性能测试而言,这两种并发情况一般都需要进行测试。

1、并发:多用户在同一时间内对系统执行操作,一般指执行同一个事务或操作
关注:进程资源征用、线程控制和系统中的内存泄漏
2、在线:多用户在一段时间内对系统执行操作
3、响应时间:从client端发出请求到得到服务端响应的整个时间。
client端响应时间+网络响应时间+server端响应时间
4、事务响应时间:完成响应事务所用的时间,是性能测试中重点关注的指标
5、点击率:客户端每秒对服务器提交的HTTP请求数
注:点击数不是鼠标点击次数,而是客户端想服务端发起的HTTP请求数,鼠标点击一次可触发多个HTTP请求
6、吞吐量:单位时间内服务器处理的客户请求数量,单位是字节
7、吞吐率:服务器每秒处理的请求数(吞吐量/测试时间),反映服务器的处理速度和性能
吞吐率和点击率的区别:
吞吐率:指服务器每秒钟处理的HTTP请求数
点击率:HTTP refers clients per server requests submitted to the=
8, TPS : server can handle the number of transactions per second, is an important measure of system capacity
9, resource utilization : the extent of the use of different system resources, such as CPU, memory, disk IO, network database connection pool usage, JVM memory use, SQL execution efficiency.

Performance testing strategy

Performance testing strategy are:Benchmarking, concurrent testing, integrated scenario testing, fatigue testingMemory leak testing, data capacity testing, stress testing, incremental test

  • 1, benchmark : that after a test environment to determine, for each business involved in the business model to benchmark. (Single-user operating performance indicators)
  • 2, concurrent test : refers to a plurality of virtual users at the same time perform the operation test point
  • 3, the integrated test scenarios : the analysis of the mechanism system architecture and the functional module and an analysis of the distribution system and the user's frequency of use, to construct a model system to test integrated scene,Simulate different users to perform different operations. As 10% of users perform a login user to perform queries 50%, 40% database updates performed by the user, the maximum real scene simulation system, the system allows the user to predict the performance level input after use.
  • 4, fatigue strength testing : Based on the comprehensive test scenarios on the long-time operating system business. (A day or more)
Published 44 original articles · won praise 1 · views 1443

Guess you like

Origin blog.csdn.net/cc_park/article/details/104170838