Have you got the ultra-detailed performance testing process?

Performance testing: Use tools to simulate a large number of user operations to verify the load on the system.

The purpose of performance testing: find potential performance problems or bottlenecks, analyze and solve them; find out the trend of performance changes, and provide reference for subsequent expansion of the system.

Test monitoring: Benchmark test, configuration test, load test, stability test, hardware and middleware monitoring.

1. Learning business:

Learn system functions by viewing documents and manually operating the system.

2. Demand analysis:

Analyze system non-functional requirements (focus on business volume, business distribution, user scale, performance indicators, etc.), determine the scope of performance testing, and understand performance indicators.

1. System non-functional requirements collection

(1) System architecture:

(2) Business process:

(3) User information:

(4) Whether the system is related to a third-party system, and whether a baffle (Mock program) is required.

(5) Does the system have an archiving mechanism: if the database has an archiving mechanism? ? ? , you can move some useless or outdated information to the archive library, which will reduce the data in the current database and help improve system performance.

(6) Performance indicators: throughput rate, response time, transaction success rate, CPU, memory, disk, and bandwidth usage thresholds.

2. System non-functional requirements analysis

Determine the scope of performance testing

Clear performance indicators

For example:

Response Time 2-5-8 Principles

When users get a response within 2 seconds, they will feel that the system responds very quickly;

When users get a response within 2-5 seconds, they will feel that the response speed of the system is not bad;

When the user gets a response within 5-8 seconds, the system will feel slow, but it is acceptable;

And when users still can't get a response after more than 8 seconds, they will feel that the system is terrible, or that the system has become unresponsive.

CPU, memory, disk, network bandwidth, etc.

picture

System hardware index threshold

These indicators are relatively abstract and should be further refined during monitoring and analysis. For example, CPU performance indicators are divided into important indicators such as user utilization rate, system utilization rate, and average load in Linux. The specific data of the above indicators come from non-functional requirements, organizational requirements (feasibility indicators summarized by the company's operation and maintenance) or industry standard recommendations.

Analyze business volume; estimate TPS and concurrent usage; analyze system protocol

3. Where do performance tests obtain requirements?

Some chapters in the general requirements document are used to describe the non-functional requirements of the system, but most requirements documents describe the performance requirements in a general and abstract manner. In the case of unclear requirements, performance test engineers usually need to actively consult the requirements provider (BA team, product team, etc.).

For old systems that are upgraded and optimized, consider whether there are historical test plan references, which may save a lot of trouble. Or we can analyze the business data of the prototype system. The most direct way is to analyze the data of the prototype system, count the business volume, business distribution and other information.

3. Job evaluation:

Workload decomposition, evaluation of workload, and planning of resource input (that is, how many manpower is required, how many working days to complete the performance testing work).

4. Design model:

After delineating the test scope, map the business model to the test model.

Business model: business process, the type of business that the system operates in a certain period of time and the proportion of its business, that is, which business is running at what time, and what is the business volume?

Test model: The business that needs to be tested is analyzed and sorted out from the business model. Split the business into objects, and realize the processes and links involved in this complete function. For example, "purchasing goods", the specific process links include "login->search for goods->submit order->pay order->exit". Then, clarify the business proportion and importance, the purpose is to:

(1) Clarify key test objects and arrange test priorities

(2) Modeling, in mixed scenarios, virtual user resource allocation, and different loads for different business functions.

(3) Clarify the basic data and data volume required for the relevant business functions in the "demand analysis-index analysis", because the demand analysis may only be roughly estimated, and whether the evaluation indicators are reasonable needs to be carefully analyzed.

Performance test scenarios: design load scenarios with reference to user habits, such as which business test scripts run together, which businesses have a sequence, and how many concurrent users are running. For example, WMS system (warehouse management system), there will be an inventory function in WMS, this function should not be mixed with daily functions, because inventory is usually once a month. Therefore, when organizing test scenarios, try to be consistent with the actual business situation.

5. Write a plan

Clearly list the scope of testing, manpower input, duration, work content, risk assessment, risk response strategies, etc. in the document.

System Overview

test environment

demand analysis

testing strategy

testing scenarios

test preparation

time plan

Test organization

deliverables list

systemic risk

6. Development script

Record scripts or develop manually, add fixed timers to simulate ThinkTime, add synchronous timers to simulate rendezvous points, add IF condition controller judgment logic, and add post-processors to obtain parameters.

7. Test environment preparation

The test environment includes servers and load machines.

The hardware architecture and configuration of the production environment and the test environment need to be estimated, otherwise the results will have large deviations. Understand the difference between the deployment of the test environment and the deployment of the production environment, whether to deploy in a 1:1 ratio. It is usually recommended to ignore the cluster when testing, and use a stand-alone test, and then consider using the cluster after the test is passed, so that a comparison can explain the problem.

8. Test data preparation:

Prepare the master data and business data of the system under test

We know that data volume changes will cause performance changes. When making test data, one must pay attention to the quantity, need to prepare enough stock/historical business data, and second, pay attention to the distribution of data. For example, if we calculate that 100 virtual users need to be sent concurrently, we need to prepare at least 100 or more accounts, and grant corresponding permissions (browse, post, delete, query) to the accounts.

So how much data is enough?

Often performance test requirements will require us to quantify the volume of the system

Data production methods can be done using tools, SQL or stored procedures.

9. Test execution

Test execution is the key to performance testing, and the results obtained by different executors of the same script may vary greatly. These differences are mainly reflected in scenario design and test execution.

Scenario Design; Benchmark Test; Configuration Test

load test; stability test;

test monitoring; test monitoring; test execution

Generally, third-party performance testing will have a test access condition (Checklist). If it is within the project group, it is not so strict, but the basic content remains the same.

(1) Check the network environment

(2) Check the test data

(3) Check monitoring equipment

(4) Script check

10. Defect management

Manage defects found during performance testing.

11. Performance analysis and performance tuning

Performance test engineers work with developers to troubleshoot performance issues.

12. Test report

How to calculate the configuration of the production environment from the test environment
For the reporter, the report is the work and the report of the entire test process. The decision-making layer (reporting to relevant stakeholders) cares about the result. The decision-making layer urgently wants to know Yes or No, whether the system can be launched, and if it cannot be launched, what problems are there, and how can they be resolved as soon as possible?

14. Evaluation

Finally: In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free【保证100%免费】
insert image description here

Software Testing Interview Documentation

We must study to find high-paying jobs. The following interview questions are the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, and Byte, and some Byte bosses have given authoritative answers. After reading this set of interview materials, I believe everyone can find a satisfactory job.

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/m0_67695717/article/details/131817888