It's so embarrassing, the post-00 test cases are better than me, it's really embarrassing...

Do you often see that whether it is a newcomer who has just entered the workplace or an old man who has worked for a period of time, he is troubled by writing test cases? For example:

How to write test cases?

As a newcomer to testing, I just started to get in touch with testing. I have a headache about how to write test cases. I can’t get in touch with the requirements. I can only do testing from the perspective of users, but this situation will lead to the inability to test the APP in an all-round way...

How to write efficient software test cases?

I have been engaged in software testing for more than half a year, and basically rely on a general understanding of software products to conduct testing work. It is difficult to conduct a comprehensive and detailed test on products. Now I want to learn how to write test plans and test cases. What related books can I refer to?

Of course, writing a good test case requires: sufficient demand analysis ability + theory and experience blessing. But this does not mean that you cannot write good use cases without testing experience and weak analysis ability. There are still methods to follow. As an old man who has been in the testing workplace for 9 years, I would like to share with you some experience in writing use cases. Next, I will start from the following aspects:

Introduction to the concept, function, content, etc. of test cases

How to write test cases?

Wechat sending Moments case sharing

1. Introduction to test cases

A test case is a set of documents prepared for project requirements, including test inputs, execution conditions, and expected results, in order to test whether a program meets customer requirements.

1. Why write test cases?

It is the guidance of testing work, the fundamental guarantee for the stability of software testing quality, and the benchmark for evaluating test results.

Having a use case to guide test execution can act as a traction when testers get tired.

In the process of writing use cases, gain a deeper understanding of system architecture or business by familiarizing with requirements

Can avoid testing the blame

2. Test case template: templates of each company may have differences, and generally include the following contents

Use case number: uniqueness, general rule: product name_test phase (it st uat)_test item_number

Test item: corresponding to a function or sub-function module

Test Title: A one-sentence summary of the intent and purpose of the current test

Severity Level: High/Medium/Low

Preconditions: Some preconditions need to be met, otherwise the use case cannot be executed

Test input: The input information that needs to be processed must be instructive when combined with the steps

Operation steps: clearly give a description of each step, and the executives can complete the execution work according to the steps

Expected results: compare the expected output with the actual results to determine whether the tested object meets the requirements

Actual result: the actual result after passing the test execution, it is empty when writing the use case.

3. Form of test case writing

Written by Excel, the template given above is this form, which is suitable for the case where the project development time is relatively sufficient

Sorting test points through Xmind, suitable for urgent project development time

Written on project management platforms such as ZenTao, not commonly used

2. How to write test cases

The general idea is divided into three steps:

Step 1: sort out functions and function points according to requirements

Step 2: sort out the test points through testing theory, methods and experience

Step 3: Mining hidden requirements, covering non-functional testing level

Example: Dynamic sending of WeChat Moments

Step 1, sort out functions and function points according to requirements

In short, it is to sort out the functions and function points that you can see. Companies generally have product requirements materials, such as requirements specification documents, prototype drawings, and UI design drawings; when there is no requirement information, you can use the software to familiarize yourself with the business. Like sending Moments, we can sort out functional modules first, then sub-functions, and then go to the details of functional requirements. Note that some unclear requirements details need to be confirmed with the product in time. Roughly sorted out as follows:

Step 2: sort out the test points through testing theory, methods and experience

This step is very important. After sorting out the function points according to the requirements, we need to split and organize specific test points for each function point. At this time, we need to imagine all the situations of user operations, including normal and abnormal scenarios.

We need to have both testing theory and testing experience in order to better design a comprehensive and reliable test case. Common test case design methods include: equivalence class division, boundary value analysis, decision table, cause and effect diagram, error guessing method, scenario method, orthogonal experiment method, state transition method, etc. Test experience requires the accumulation and precipitation of multiple project tests. For new testers, the test experience may tend to be zero. At this time, you can learn from some previous experience. For this, I once compiled a document. After using the document, many new testers feel that they have a sudden sense of test cases and know how to write use cases.

This information is shared as follows:

Note: This information can be used in the analysis of any software product. In essence, any software product operated from the user’s perspective, the operation function is nothing more than adding, deleting, modifying and checking the data, so when needed When analyzing and writing test cases for software products, we can use the test points sorted out above to apply and write test cases according to which operation the current function is to add, delete, modify and check. According to the operation of adding, deleting, modifying and checking, it is divided into:

Form test: pages related to data submission, including adding or deleting data pages

Search Test: Page Queryed for Data

Deletion Test: Pages Deleted for Data

Cookies, session, etc. tests: user operation perspective, supplementary tests

Database testing: adding, modifying, deleting, and querying business-related operations on pages are adding, modifying, deleting, and checking database data

Through testing theoretical methods and testing experience, we can get the testing points of WeChat Moments:

Written as an Excel document use case, it can be:

728 x 291 1254 x 502

Step 3: Mining hidden requirements, covering non-functional testing level

In addition to the above functional levels, for WeChat mobile products, some feature tests also need to be considered, including non-functional test levels, such as:

3. Summary

Although it is not that simple to write a use case, but through the above, have you found that there is still a method to follow? If you don’t know how to write, write it first by imitating it. Over time, through the long-term training of test thinking in the project and the experience summary of bugs in the work, I believe that one day you will find that writing test cases is not so difficult!

"Test Case Template Encyclopedia"

On the arrangement of learning resources:

Document acquisition method:
This document and video material should be the most comprehensive and complete preparation warehouse for friends who want to engage in [software testing]. This warehouse also accompanied me through the most difficult journey, and I hope it can also help you! All of the above can be shared, just click below to enter the group to receive it yourself, thank you for taking it away.

Guess you like

Origin blog.csdn.net/NHB456789/article/details/130527609