How to write a performance test plan to make you more professional?

Performance Test Plan
Performance testing is a very important type of testing used to determine how a system or application will perform under a specific load. The following are suggested steps for a performance testing plan:

Goals
First, define the goals and scope of the performance test. This includes the system or application being tested and the performance metrics that need to be tested (such as response time, throughput, etc.). You also need to determine the scenarios and load types to test.

Test Environment
For performance testing, it is necessary to create a dedicated test environment that is similar to the production environment and has sufficient hardware resources to simulate the load of actual usage. If possible, it is best to use automated tools to deploy the test environment.

Test Data
Test data is an important part of performance testing, but it is often ignored. Before testing, real datasets need to be prepared so that they can be used during testing to simulate real user behavior.

Testing Tools
Select the appropriate performance testing tools and write test scripts. You can use open source or commercial tools like Apache JMeter, LoadRunner or Gatling etc.

Test Execution
Executes performance tests, and records and monitors test results. Make sure to track key metrics like CPU, memory and network utilization during testing and collect log files and reports.

Analyze and Adjust
Once testing is complete, you need to analyze the results and make adjustments based on desired performance metrics. In the process, you can identify bottlenecks and performance issues, and identify necessary optimizations to improve system or application performance.

Report
Finally, write a performance test report that includes test results, analysis, and suggested optimizations. Make sure the report is easy to understand and covers all test objectives and scope.

Introduction
Before entering today's content, think about a few questions:

What is a test plan?

       What is a Performance Test Plan?

In your performance knowledge area, what do you think should be included in a performance test plan?

Because as the gold medal interviewer of the company, the job seekers who have passed my interviews do not have four digits, at least one digit. Whether it is a performance test novice or a senior performance test engineer, almost no serious or complete implementation of the performance test plan.

Actually, there are two reasons for this situation:

1. Enterprises do not pay much attention to performance testing;

2. The ability of the testers themselves is insufficient.

Seeing this, would you say, Look: it's not that I'm unprofessional, it's not that I don't want to write a professional performance test plan, it's just that my company doesn't have high requirements for performance test plans.

As a performance test engineer, your professionalism must be higher than that of other people in the company. Therefore, what you have to do is to infinitely magnify your professionalism to perfect the gaps in the company.

Don't have this kind of thinking: Anyway, the BOSS is not professional, I just write a few paragraphs to fool it. At the same time, in order to allow you to reflect your professionalism in the chat with the interviewer and let the interviewer "convince" you, I wrote this article, and I hope you can apply what you have learned.

What is a performance test plan
Speaking of what is a performance test plan, we have to mention, what is a test plan. Quoting the official documentation:

A document describing the scope, methodology, resources and schedule of the testing activities to be carried out;

It is the assembly test and confirmation test of the application software of the entire information system;

It determines the test items, the characteristics to be tested, the test tasks, who performs the tasks, and various possible risks;

The test plan can effectively prevent the risks of the plan and ensure the smooth implementation of the plan.

In the early stage of the project, the test plan must be done, and it is also the ability that a software test manager must have. A complete test plan can:

Formulate a realistic and comprehensive plan for each test activity, including the object, scope, method, progress and expected results of each test activity;

Determining the time and resources required for testing to ensure its availability and effectiveness;

Establish the test completion and test success criteria for each test phase, and the goals to be achieved;

Identify various risks in testing activities, eliminate possible risks, and reduce losses caused by risks that cannot be eliminated.

You see, the advantages of a test plan are so many:

Up: Leaders do macro-control;

Down: Testers understand the testing tasks at different stages of the project.

Do you still think the test plan is not important?

Knowing the test plan, let's talk about the performance test plan. A simple one-sentence summary: it is a test plan formulated for the performance of the project.

A test plan contains all phases of overall testing: interface, functionality, performance, automation, integration, etc...

The performance test plan is the plan setting for the performance test. After understanding the performance test plan, then:

What does a performance testing plan contain?

And how to write an effective performance test plan?

How to make your performance test plan match the actual project?

With these questions in mind, let's talk about them one by one.

What the performance test plan contains
When it comes to the performance test plan, let me first show a picture:

Seeing this performance test plan, does it feel familiar. Is it the same scenario as the performance test plan you wrote? Do you feel that these contents are enough?

If you think so, then please think about the following questions:

If there is no performance target, can you conduct a performance test;

If there are no performance scenarios and performance indicators, can you write performance scripts;

If there is no system architecture diagram, can you quickly understand the system architecture logic;

If monitoring is not deployed, can you quickly locate and analyze performance bottlenecks.

You see, these are all needed in the actual performance test, so they must be listed in the performance test plan. Otherwise, how to design scripts, how to monitor deployment, how to find problems and analyze performance bottlenecks?

According to the above ideas, I will provide another performance test plan diagram for comparison:

Through the comparison of these two pictures, it can be found that the second picture is more complete, no matter whether it is facing the boss upwards or downwards, it is clear at a glance. Therefore, you can find that a good performance test plan can know the purpose and what to do even if it is shown to a layman.

At this time, you may have a question, how long will it take to write with so much content in my performance test plan? How to write the content of each item? How to let a performance test novice quickly grasp the essentials of writing a performance test plan?

Here, I will disassemble them one by one.

Background
First describe the background of the project, and then explain the background of the performance test of this project.

Performance goals
Set test goals in combination with performance test scenarios, for example:

According to the benchmark scenario: test the maximum capacity of an interface;

According to the stability scenario: test the maximum running time of an interface.

Pressure test scope
According to the main process of the system, screen the interfaces that need to be tested, such as:

computing interface;

synchronous interface;

Other major interfaces.

Start-stop criteria
This mainly includes:

Start-up criteria: everything is ready, and performance testing needs to be started;

End criteria: all test tasks are completed, end the test;

Suspension criteria: During the test process, the test cannot be performed due to the interference of the test environment, resulting in the suspension of the test;

Restart criterion: After solving the problems in the test process, you can continue the test.

Performance indicators
include the following:

target interface;

Target TPS;

TPS standard deviation;

Response time;

Response time label variance.

System architecture diagram
System logical architecture diagram;

System deployment architecture diagram.

Preparations before stress testing
are mainly hardware resources, such as:

Number of servers: apply according to actual project needs;

   Server usage: database, cache, cluster, application service, monitoring service deployment, etc.;

Server configuration: It needs to be the same as the online server configuration.

Tool preparation
Pressure measurement tools: actual pressure measurement tools, such as: Jmeter, Ladrunner, Lcust, etc.;

Monitoring tools: Prmethues, Grafana, Kafka, Lgstash, Spring Bt Admin, etc.

data preparation

Preparation of test script data:

Read the data of the csv file;

Data written directly to the database.

Performance Design
consists of two parts, namely:

Performance testing strategy: continuous, incremental strategy;

Business scenario design: 4 scenarios, such as: benchmark scenario, capacity scenario, stability scenario, and abnormal scenario.

The monitoring design
consists of two parts, as follows:

Global monitoring design: such as Prmetheus, Grafana, Spring Bt Admin, etc.;

Oriented monitoring design: monitor and analyze specific applications and databases, such as jstack, mysqlreprt, etc.

Project organizational structure
Project team members involved in performance testing:

PM

architect

Development Engineer

Performance Test Engineer

Performance script writing engineer: performance test analysis engineer, operation and maintenance

The outcome output
consists of three parts, namely

Process output: performance test script, performance defect list;

performance test report;

Performance tuning report.

Project risk analysis
is mainly carried out through the following points:

Whether the requirements of the business layer are clear;

Environmental issues;

data issues;

business model;

personnel issues etc.

You see, I disassembled the content of each item of the performance test plan, so that it is easy to understand.

So I set up a self-study group for software testing and development. Friends who are learning testing can click the small card below

Guess you like

Origin blog.csdn.net/2301_76643199/article/details/131127377