Discuss in detail why we need to write test cases


关注我,每天分享软件测试技术干货、面试经验,想要领取测试资料、进入软件测试学习交流群的可以直接私信我哦~~

How to write test cases? Why write test cases? A test case is a set of documents composed of test inputs, execution conditions, and expected results, designed to prove that the software has specific problems for a specific purpose. Documents that guide how to perform the test. This document mainly records the requirements for verifying whether the software under test meets the requirements.

How to write test cases

The test case guides us how to do the test document. In the document, specify in advance what the function point is, how to test the steps of this function point, and some input test data are written into it, including the desired result.

If you have time to try all the conditions, you will not miss any tests. But the problem is that time is actually not allowed, especially when they are all taking the agile path. Everyone can't wait to complete a new feature in one day, so there is almost no time to test it. How to cover all test scenarios and control the number of test executions to a more appropriate number? This is the process of designing test cases.

Test case writing method: divide functional modules-positive functional verification: whether normal operation functions are realized-single functional item verification: positive + abnormal-interactive verification between functions: data transfer between modules-hidden requirements: familiar with the business. With conventional thinking and experience accumulation, theoretical support is needed. Test cases are designed through human thinking, and there are unavoidable omissions in this process. Consider two aspects of design use cases:

1. Test case design method

The key part of the test theory is to divide the requirements into specific test points, and then execute the specific design according to the use case design method. The key to dividing the requirements is to be familiar with the requirements, and to accumulate personal testing experience (if any) according to the existing description in the document according to the user’s usage scenario, divide a large part of the content into test points, and use the use case design method directly, so that you can It is directly converted into Excel test cases through concise and clear text descriptions. In this process, the general understanding of the process is to split and optimize the process until you can directly write use cases to verify specific functional points.

Design use case methods include: observation method, equivalence class, boundary value, decision table, cause and effect diagram, flow chart, scenario method, error speculation method, etc.

2. Test design ideas

If the existing description information has been split according to the requirements, is it possible to ensure that there is no problem in the test? In fact, if you need to expand the comprehensive test on the basis of the above, you also need to rely on the characteristics of the software quality model. Starting from these characteristics, give test case designers more thinking space. This design is more comprehensive and reliable.

Description of the characteristics of common software quality models: Functionality: whether the function is available and whether it is easy to use; performance efficiency: the resource consumption and response time of the corresponding system; ease of use: easy to understand, learn, and use; compatibility: compatible with different software Hardware platform; Reliability: It is not easy to cause problems, and it is easy to recover in case of problems; Security: The safety guarantee for users (external personal safety, internal information security, etc.); Portability: Can it work under different environmental conditions Trouble-free operation; maintainability: Whether it is convenient and quick for later repair and maintenance.

The important role of writing test cases is to avoid the occurrence of "flicking the pot and backing the pot", technically transform the requirements into specific and verifiable indicators, record possible software problems in the form of documents, prevent omissions in the activities of the test process, and improve Work efficiency, test workload display.


If you

① Engaged in functional testing and want to advance automated testing

②I have been in the testing industry for one or two years, but still can’t type code

③ Interviews with big companies but repeatedly bumped into walls

I invite you to join the group! Come on~~Tester,313782132(There are technical experts in the Q group to communicate and share together, the value of learning resources depends on your actions, don’t be a "collector") Get more technology and interview materials from major factories


Golden nine silver ten interview season, job-hopping season. The information compiled for everyone is organized around [software testing]. The main content includes: python automation test exclusive video, Python automation details, a full set of interview questions and other knowledge content.May you and I meet and you will find something! Follow me to receive~

If the article is helpful to you, please reach out to make a fortune and give me a like. Thank you for your support. Your likes are my motivation for continuous updating.

Recommended reading:

What kind of person is suitable for software testing?

Talking about starting from a small company to a big factory, what did I do right?

Want to switch to software testing? Come and see if you are suitable

From self-study to work in software testing, how should software testing learning be carried out?

How to write a software test engineer resume project experience?-1,000 software test engineer resume templates (real resume) that have been successfully recruited

Guess you like

Origin blog.csdn.net/weixin_50271247/article/details/115144315