The top priority of software testing theory: the basis of test cases

A test case can fully see the technical level of a tester, and a good test case is to find errors that have not been discovered so far.
So what is a test case?

What is a test case

A test case is a test document that describes inputs, actions, and an expected result. Its purpose is to determine whether a certain feature of the application is working properly.
Test cases are one of the main work results of the software testing team, and
the quality of the test cases is closely related to the level of the testers who wrote the test cases.

The main components of the test case

1. Use case number format:
project abbreviation + module abbreviation + sequence number

2. Pre-conditions:
Pre-conditions, as the name suggests, refer to the preconditions that need to be prepared before performing operations in the software to verify the needs of users.

3. Use case title:
Just like a person’s name, give the use case you write a name to facilitate the execution of the use case and the writing of bugs. It is easy to understand when other people refer to it. In addition, try not to repeat the name of the use case.
General format: what results can (cannot) be achieved by performing what operations at a certain position in the program

4. Importance level:
test case level, according to the size of the function, and the impact on the system, divide the level, in order to deal with risks.
Depending on the company, the usual test levels include: Level
1, which is a high-impact, obstructive, and process-related use case. For example, the login button is unavailable, and Baidu is unavailable at
level 2. The large function points have hindered the execution of a small number of use cases. For example, if you add a new button, if it fails, many functions cannot be tested.
Level 3, small function points, such as refresh, refresh function, etc.
Level 4, small UI issues, location, size, verification, suggestions, etc.

5. Test steps:
Test steps, in order to verify a function, what kind of operation do we need to see this function.
The test steps include:
open the xx browser and open the xx webpage.
On the login page, enter the xx data, similar to entering Liu Xiaofang, and click OK.
On the xx page, click the xx button.
On the yy page, verify the xx function display

6. Expected result The expected result of the
test case, what result will be achieved after the use case is executed.
According to the different function points and demand points, the expected results are also different. You can expand the test case name.
7. Actual result
As the name implies, it is the final result obtained after the test is executed step by step according to the step description in the test case.

8. Tester
The test engineer who executes the test case.

The role of test cases

⒈Guide the implementation of testing The
test cases are mainly applicable to integration testing, system testing and regression testing. When implementing the test, the test case is used as the test standard, and the tester must implement the test according to the test case strictly according to the use case items and test steps. And the test situation is recorded in the test case management software in order to automatically generate test result documents.

⒉Planning the preparation of test data
In our practice, the test data is separated from the test cases. Prepare one or several groups of test raw data and standard test results according to test cases. Especially for the correctness of data sets such as test reports, it is very necessary to prepare test data according to test case planning.

⒊The "design specification"
for writing test scripts In order to improve the test efficiency, software testing has vigorously developed automatic testing.
The central task of automated testing is to write test scripts. If it is said that software programming in software engineering must have design specifications, then the design specifications of test scripts are test cases.

⒋Measurement benchmarks for evaluating test results
After completing the test implementation, it is necessary to evaluate the test results and prepare a test report. Judging whether the software test is complete and measuring the quality of the test requires some quantitative results.
Example: What is the test coverage, test pass rate, important test pass rate, etc. In the past, statistical benchmarks were software modules or function points, which seemed too rough. It is more accurate and effective to use test cases as measurement benchmarks.

⒌ Defect analysis standard
By collecting defects, comparing test cases and defect databases, analyzing and confirming whether it is a missed test or a defect recurrence.
Missed testing reflects the imperfections of test cases. Corresponding test cases should be supplemented immediately to achieve the gradual improvement of software quality. And there are corresponding test cases, which reflect that there are problems with the implementation of the test or change processing.

Principles of test cases

1. The language is concise and clear, but not too simple
2. The language is unambiguous, and try to use too long sentences as little as possible
3. All the basic elements of the use case must be complete without missing
4. The steps of the use case should be sufficiently detailed and the operation should be clear
5. Easy It can be read and understood by other test engineers and can be executed smoothly
. 6. Use cases have their own granularity, which can be coarse or fine.

Guess you like

Origin blog.csdn.net/weixin_47580822/article/details/106299286