Test cases-written from recognition

1. Why do we need test cases

Before understanding the writing skills of test cases, we need to know why we need test cases.

After the development is completed according to the relevant requirements of the product, the tester needs to perform traversal functional testing on it, and the test case is our reference when traversing the functional test, which can make our testing more efficient and oriented.
In layman's terms, the test case is our shopping list when we go to the supermarket. Without this list, we may waste time buying other things, and the things we originally wanted to buy have not been bought out. Test cases are important and necessary.

Second, the concept of test cases

For the concept of test cases, Baidu Baike explains it like this:

Test Case (Test Case) refers to the description of the test task of a specific software product, reflecting the test plan, method, technology and strategy. The content includes test objectives, test environment, input data, test steps, expected results, test scripts, etc., and finally forms a document.

In the author's opinion, the core content of test cases is actually only three parts strictly speaking: test input, execution conditions, and expected results . According to these three parts, a document is written, namely test cases.

Three, the preparation process of test cases

Requirement analysis (product documentation) -> extract test points -> write test cases -> test case review/supplement

Fourth, the content of the test case

Different companies may have different requirements for the test case content. The author provides a reference based on the test case content requirements of a certain company. The test
case content includes three major items: functional description, functional test points, and compatibility (embedded points)

1. Function description

Function description\content example
function name Company name candidate input
Project Background Add the function of company name candidates to a web page, guide to increase the proportion of real company names and provide convenient input functions, simplifying the operation path
Change point 1. To create a company, enter the name to connect to Tianyan Check, and the input content can display the corresponding candidate column
Product Documentation https://www.baidu.com/
Interface documentation https://cn.bing.com/
Technical solutions https://www.google.com/
Related personnel Product: Malone Development: XXX Test: drake

2. Function test point
Enterprise candidate name input example
3. Compatibility test

  • Mobile terminal (Android, IOS, tablet)
  • PC side (resolution)
  • Browser (mobile, PC browser)

4. Buried point test

There are many types of buried points, so I won't elaborate on them one by one. Most of them are to find the corresponding buried points in the console after the page is clicked or go directly to the buried point data page to check whether there is data for that click. Generally, product personnel are responsible for buried point testing.

Five, test case writing method

There are roughly three ways to write test cases at present:

  • excel form
  • word document
  • mind Mapping

Although the forms of these three methods are different, the content presented is actually the same. Just choose the way you like. For some small functional changes, the author recommends the way of mind mapping, because it is simpler and more efficient to write, and more time can be spent on testing.

Six, test case writing actual combat

Introduced so much about the test case, we use a practical example to further understand it.

The following is the official website page of Tianyancha. The picture shows the expected effect of the product documentation. The demand can be matched through user input to display the corresponding enterprise candidate column.
Take the sky's eye check for example
According to this requirement, we can quickly locate the two most important test points

  • Candidate column display check
  • Content check and close conditions after the candidate column is displayed

After confirming the test framework, we need to test it divergently. The details are shown
Enterprise name candidate input test case
in the test case in the following figure. After the development and testing, we perform traversal testing according to the test case to complete the test completely and efficiently.

Seven, small suggestions

When you usually browse the web, you can perform cloud tests on the functions in the web pages (ie, simulate tests in your brain). For example, when you visit Taobao and Tieba, if you let you test some of its functions, what points would you consider? Is the consideration comprehensive? Keep the thinking and habits of testing in your life, and you will get twice the result with half the effort when actually writing test cases.

If you have any questions or supplements, you can comment below, thanks for reading~

Guess you like

Origin blog.csdn.net/weixin_39740094/article/details/103445907