Some insights from Alibaba’s three years of functional testing

1. Introduction
Functional testing is the basic skill of test engineers. Many people are not good at functional testing, so they want to do performance testing and automated testing. Many people's understanding of functional testing is just a little bit. If you don't understand and study it yourself, your career will stay at a little bit. Here, I write down my understanding of functional testing.

2. Skills required for functional testing
2.1 Be proficient in using SQL
1. You must be able to write commonly used SQL statements. For example, adding, deleting, modifying, checking, etc.

2. Understand database transactions, be able to write stored procedures, and be proficient in commonly used system functions.

3. Understand and be able to perform database backup, migration, restore, mirroring and other operations

4. Tune sql statements and monitor the performance of the statements that can be run.

5. Understand operations such as database clustering.

2.2 Linux
Linux is a basic skill for testers. There is no need to master Linux commands that are too difficult or very uncommon. Normally, you can check logs and locate problems.

1. Basic commands
Commonly used basic Linux commands are often asked in interviews, or a scenario is given to ask you what command to use.

2. Check the logs.
Junior testers often encounter situations when they find bugs and the developers refuse to admit them or are unwilling to solve them. How can testers get rid of such problems?

That is to check the logs and locate the problem according to the log level based on the discovered bugs.

So here is the first thing to talk about the log level.

First remember this: the higher the log level, the less information is output.

The specific log levels are divided into four levels:

info: code info information, excluding some debug information such as sql statements

warning warning: code warning message

error: The error message reported by the program itself is java.lang.outindexERROR.....

critical: almost never used

Generally, bugs that do not meet the requirements are in debug, and bugs reported by the program itself are in error.

2.3 Use the database and follow the data flow
1. The nature of the database Common
databases are mainly MAYSQL, ORECAL, and Redis

The Mysql database is a typical relational database

2. Database operations
(1) Database and table operations

(2) Table data operations

(3) Complex sql query

2.4 Write good test cases
. It is a very important type of document in the testing process. It is the core of the testing work, a set of input and output standards during testing, and a specific comparison of software requirements. Writing test cases is a basic skill for testers, but not many people can actually write them well.

What the test case must contain:

Use case number, use case name, test background, preconditions, priority, importance, test data, test steps, expected results, actual results, remarks.

1. Test case writing process
Requirements analysis->Extract test points->Test case writing->Test case review

2. Ideas for writing test cases
(1) Extract test points based on the RPD of the product.

(2) According to the direction of data flow.

(3) Deploy according to the architecture.

(4) Common methods for writing test cases: equivalence class division method, boundary value analysis method, flow chart method, etc.

(5) Covers weak network testing, interface testing, security testing, performance testing, etc.

(6) Commonly used testing tools include: Postman, Charles, Fiddler, Jemter, Loadrunner, etc.

3. Things to note when writing test cases
(1) Design the test case form according to the actual situation of the project

(2) Do not copy the use case format mechanically

(3) Prepare according to specific circumstances

(4) Learn to question the requirements, do not write test cases exactly according to the requirements, understand the requirements from the perspective of customers and products, and see functions and experiences beyond the requirements.

4. Manage test cases
Why do you need to manage test cases?

(1) The number of test cases is huge

(2) Test cases will change according to changes in requirements

(3) Test cases need to be supplemented and improved in the long term

How to manage test cases?

(1) Original Excel management

(2) Professional project management systems (eg: git, ZenTao, JIRA, Confiuence, etc.) are generally in web format

2.5 http and https protocols.
Interviews often ask the following questions about the HTTP protocol.

1. Http protocol principle

2. The difference between http and http protocols

3. The difference between TCP and UDP

4. The difference between session and token

5. Understanding of public keys and private keys

6. The difference between get and post

7. What happens from entering the URL to page loading?

8. What is proxy, forward proxy and reverse proxy?

2.6 Understand the business
When doing functional testing, you must understand the business or even understand the business. Only by thoroughly understanding the business can we do a good job in functional testing and achieve certain improvements.

After you are familiar with the business, you will know a lot of common sense. After knowing the following common sense, you can try to advance and learn to do automated testing, interface testing, and performance testing.

1. When to intervene in automation => When your system becomes stable

2. When to intervene in interface testing => When the interface development is completed

3. When to intervene in performance testing => When there is a promotion, or when there is a rush to buy (618 big sale, grab train tickets during the Chinese New Year, grab coupons)

For example, for 5,000 coupons, how many people will grab them and how long will it take to grab them?

2.7 Bug Management
When doing functional testing, another very important task is bug management. An excellent tester will have many online bugs, more than other colleagues working with you, but very few online bugs, less than other colleagues.

1. Bug definition

(1) Does not meet the needs

(2) The program itself reports an error

(3) Does not conform to users’ usage habits

2. Bug life cycle When our testers submit a bug, the bug has its life cycle from the beginning to

End, the life cycle is as follows

3. Bug ticket content

Bug description (summary)

Environment information: operating system/database/browser/software version (OS/Database/Project/Build/Release)

Affiliated functional module, tester/developer, severity level (1-5), customer priority, risk level, status, reproduction steps, actual results, whether to return the problem, etc.

4. Test report

Document the testing process and results, analyze the problems and defects found, and provide a basis for correcting existing quality problems in the software.

At the same time, it lays the foundation for software acceptance and delivery. Test reports are the same as test plans. They are generally written by the test leader and testers need to understand

Let’s see what’s included in the test report

2.8 Typical bugs
1. Packet capture function: Test the search function of an app, capture packets, capture a search interface, and suddenly find that two request interfaces are captured -> When the number of visits increases, the service pressure increases twice.

2. Data flow direction: During the test, it was found that there was only one piece of data on the page, but there was one more piece in the database -> 1. The amount of data became larger and the query became slower. 2. There was too much dirty data, it was full in an instant, and the program crashed.

3. Weak network test: The app project must have weak network test (simulating 2g, 3g, 4g, wifi network status and packet loss); network switching test (reconnecting after network disconnection, switching from 3g to 4g/wifi, etc.)

3. Summary
To sum up, it is not easy to do functional testing well. I have been doing Internet function testing for two years, but I still don’t understand a lot of knowledge. Only by continuous learning can I become a talent.

Many people are not good at functional testing, so they only want to do performance testing and automated testing. In fact, they are too ambitious. I think that if the foundation is laid, then they can learn performance testing, automated testing, etc., and they will definitely get twice the result with half the effort.
Finally, I would like to thank everyone who reads my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, if you can use it, you can take it directly:

How to obtain documents:

This document should be the most comprehensive and complete preparation warehouse for friends who want to engage in [software testing]. This warehouse has also accompanied me through the most difficult journey. I hope it can also help you!

All of the above can be shared. You only need to search the vx official account: Programmer Hugo to get it for free.

Guess you like

Origin blog.csdn.net/2301_79535544/article/details/133323416