Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write test cases according to requirements analysis documents

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Don't start writing test cases immediately after you get the requirements document. You need to carefully sort out the requirements, draw system-level and intra-module flow charts, and find out various test points. After brainstorming the requirements, the function of the test system is clear.

Then start writing test cases.

So what is the general idea of writing test cases?

1. Organize and analyze the requirements documents

Read the requirements document carefully, record what you don't understand and key test points, and simply draw the overall flow chart.

Then do it again, carefully analyze the functions of each module, draw the flow chart within the module, find out all the functions, and list the main test points

2. Write use cases

Test cases can be divided into four parts according to different business rules:

Scenario use case, system use case, function use case

Scenario use case: design the use case according to the user's actual operation and business logic, without involving very complex operation or logic, and take the most common and normal operation flow of the user as a scenario to design the test case.

System use case: it is a refinement of user scenarios, including normal scenarios, branch scenarios and abnormal scenarios, which are composed of two or more related functions.

Function use case: business rules used to verify each function point, including interface elements and business rule verification of each function. Mainly for a single function point.

Step 1: scenario use case (keyword: simulate the actual operation of the user)

According to the in-module flow chart drawn, describe the main business objectives of the user, including a complete system-level scenario and different scenarios that simulate the actual operation of the user, and the combination of several function points can also be regarded as a user scenario.

Step 2: system use cases for each role of the system

Combined with the module flow chart drawn, the system is divided into multiple roles, and then each role is divided into multiple tasks, each task is a system use case. The use case of the system is divided into normal process, exception process and branch process, which is described in the form of scenario.

Step 3: functional use cases

Describe the logic rules and page elements of the single point function, describe the logic rules hierarchically, and refine the logic rules can be directly described as the operation steps of the use case.

3. How to write test cases for report class function module?

The module of the report class basically has no business flow, so it is not applicable to the scenario method. In fact, the report class module mainly verifies whether it can correctly query and display the data according to the query conditions, and ensure the correctness of the data.

Test cases can be divided into function point test cases and report data correctness verification.

Step 1: write query function use cases

The query function can be decomposed into multiple test scenarios to verify the expected results of each scenario. It can be classified as follows.

Scenario 1: the default condition query result is correct

Scenario 2: modify optional input criteria and query results are correct

1. Go to the search (Advanced search) page.

2, select each query condition one by one, such as "all", "Category 1" and so on, click "search", the query result is correct.

3, the combination of various query conditions are optional, such as: price + products, click "search", the query results are correct.

Scenario 3: the query result is correct by modifying the input condition

1. Go to the search (Advanced search) page.

2. Enter the text field conditions one by one, fuzzy query value, click "search", the query result is correct.

3. Enter the text field conditions one by one, match the values perfectly, click "search", and the query results are correct.

4. Enter the text field conditions one by one, the Chinese value, and click "search". The query result is correct.

5. Enter the text field conditions one by one, with uppercase and lowercase values, click "search", and the query results are correct.

6. Enter the text field conditions and numerical type values one by one, click "search", and the query results are correct.

7, enter the text field conditions one by one, full-width, half-width values, click "search", the query results are correct.

8. Combine the query conditions of each text field and click "search". The query result is correct.

Scenario 4: the query results of the combination of optional conditions and input conditions are correct.

Scenario 5: error, empty record query result is empty.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report