Summary of test case design ideas

Source: Internet
Author: User
Tags how to write test cases

How to design test cases on demand.

From the need to get the document do not immediately start writing test cases, need to carefully review the requirements, draw a system-level, module flow chart, and find a variety of test points, and so on the needs of the brainstorming-like finishing, at this time has been the function of the test system is very clear, and then started to write test cases. So what is the general idea of writing test cases? Through half a year of test case writing experience, summarized as follows, if there is something wrong to improve.

1. Collate and analyze requirement documents

Carefully read the documentation for the requirements document once, record the areas that are not clear and key test points, and simply draw the overall flowchart. And then again, carefully analyze the functions of each module, draw a flowchart within the module, find out all the functions, and list the main test points

2. Writing Use Cases

Test cases can be divided into four parts according to different business rules: scenario use cases, system use cases, function use cases

Scenario use case: According to the user's actual operation and business logic design use cases, do not involve very complex operations or logic, the user's most commonly used, normal operation process as a scene design test cases.

System use Case: is the refinement of the user scene, contains the normal scene, the branch scene and the unusual scene, is two or more related function combination of the scene.

Feature use case: a business rule that validates each function point, including the interface elements and business rule validation for each function. Primarily for single function points.

The first step: scenario use case (keywords: simulating the user's actual operation)

According to the drawing of the module inside the flowchart, describe the user's main business objectives, including a complete system-level scenarios and simulation of the user's actual operation of the different scenarios, a combination of several functional points is also considered a user scenario.

Step Two: System use cases for each role of the system

Combined with the drawing of the inside of the module flowchart, the system is divided into multiple roles, and then split each role into multiple tasks, each task is a system use case. The system use cases are described in the form of a scene, such as normal flow, abnormal flow, and branching process.

Step three: Functional use cases

Describe the logic rules and page elements of the single point function, describe the logic rules hierarchically, and describe the logical rule refinement as the operation steps of the use case directly.

There are also some confusion in the process of writing use cases:

Question 1: What is the way the scenario method is described more clearly, and later requirements change easy maintenance.

Question 2: What is the relationship between the test case and the test data? How to separate the two.

3, Report class function module how to write test cases.

The module of the report class basically has no business flow, and the scenario method is not applicable. In fact, the report class module mainly verifies whether the display data can be queried correctly according to the query condition and ensure the correctness of the data. Test cases can be divided into functional point test cases and report data correctness validation.

First step: Writing query function Use Cases

The query function can be decomposed into multiple test scenarios to verify the expected results of each scenario. The following classifications can be made.

Scenario 1: The default condition query results are correct;

Scenario 2: Modify selectable input criteria query results are correct

1. Go to the search (Advanced search) page. 2. Select each query condition option, for example: "All", "Category 1" and so on, click "Search", the query result is correct. 3, combination of various query conditions can be selected, such as: Price + products, click "Search", the query results are correct.

Scenario 3: Modify input Criteria query results are correct

1. Go to the search (Advanced search) page. 2, enter the text field conditions, Fuzzy query values, click "Search", the query results are correct. 3, enter the text field conditions, exactly match the value, click "Search", the query results are correct. 4, enter the text field conditions, Chinese values, click "Search", the query results are correct. 5, enter the text field conditions, letters large, lowercase values, click "Search", the query results are correct. 6, enter the text field conditions, the number type value, click "Search", the query results are correct. 7, each input text field conditions, full-width, half-width value, click "Search", the query results are correct. 8 combination of each text field query criteria, click "Search", the query results are correct.

Scenario 4: Combination of optional conditions, input criteria query results correct

Scenario 5: Error, empty record query result is empty

The second step: writing additional function point test cases, you can also break down the function points into multiple scenarios.

Step three: Write data correctness verification test cases

To find out the various data factors affecting the report, enumerate the various data of the report display, and enumerate both to compile the data correctness verification use case.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.