Test the theory - how to design test cases based on demand

After the demand to get the document do not immediately start out to write test cases, require careful scrutiny finishing needs, draw the system level, within the module flow chart and identify various test points, and other demand was to brainstorm-like finish, this when the system has been tested to function very clearly, and then proceed to start writing test cases. So what's the general idea of ​​writing test cases is it? Write test cases by six months of experience, summarized below, if wrong place needs to be improved.

1, finishing analysis requirements document: Carefully read the requirements document again, and the record does not understand where the key test points, the overall draw simple flow chart. Then do it again, careful analysis of the function of each module, the module shown in the flow chart to find out all the features, and lists the major test points.

2, prepared by Example: according to different test business rules can be divided into four parts: the use case scenario, the system use case, function.

Example scenario use: the actual operation of the user logic design business use cases, not necessarily involving complex operations or logic, the user is most commonly used as a normal operation flow test scene design.

Example systems: is a detailed user scenarios, including normal scenes, scenes and the branch scenes abnormalities is a combination of two or more features from the associated scene.

Example functions with: business rules used to verify the function of each point, each of the interface elements and functions including business rules verification. The main function for a single point.

Step: Example scene with (keyword: Analog user actually operates): according to the flowchart shown within the module, the user's key business objectives described, comprising a complete system-level simulation scenarios and different user scenarios practical operation, several functions a combination of points can be considered user scenarios.

Step Two: systems each character system embodiment: flowchart drawn binding module, the system into a plurality of roles, each role and then divided into a plurality of tasks, each task is a system use case. Systems were divided into normal process, abnormal process, branched process, described in terms of a scene.

The third step: with the described logic rules function and a single point function page elements, hierarchical description logic rules refinement procedure as described in Example with logic rules directly.

The process of writing use cases there are some confusion:

Question 1: What method described the scene more clearly, and late changes to the demand and easy to maintain? 
Question 2: the relationship between test cases and test data, what is it? How to distinguish the two?

3, how to report class function modules written test case? Report class module substantially free traffic flow, the scene is not applicable law. In fact, a report class module is mainly to verify whether the correct query and display data based on the query conditions, and to ensure accuracy of the data. The test point can be divided into functional correctness verification test and report data.

The first step: preparation of inquiry with Example: search function can be decomposed into a plurality of test scenarios, results are expected to verify each scene. May be categorized as follows.

Scenario 1: By default the query results are correct;

Scene 2: Modify Search results correctly select the input conditions

1, enter the search (advanced search) page.

2, individually select each query options, such as: "All", "Category 1" and click "Search" correct query results.

3, a combination of various query options, such as: price + products, click on the "Search" correct query results.

Scenario 3: Modify the query results are correct input conditions

1, enter the search (advanced search) page.

2, one by one input text field conditions, the value of fuzzy query, click on "Search", the correct query results.

3, one by one input text field conditions, exact value, click "Search", the correct query results.

4, one by one input text field conditions, the Chinese value, click "Search", the correct query results.

5, one by one input text field conditions, large letters, lowercase value, click "Search", the correct query results.

6, one by one input text field conditions, the numeric value type, click "Search", the correct query results.

7, one by one input text field conditions, full-width, half-angle value, click "Search", the correct query results.

8. The composition of each text field query, click on "Search" correct query results.

Scenario 4: a combination of optional condition, the correct query result input condition Scenario 5: Error, empty record an empty result set

Step two: write additional function point test, the same function can be decomposed point multiple scenes.

The third step: write test cases to verify the correctness of the data: data to identify various factors that influence the report, citing a variety of data reports show, citing both write data to verify the correctness of the use cases.

While Learning's not a pleasure!
 
 
From https://www.cnblogs.com/wxinyu/p/7688222.html

After the demand to get the document do not immediately start out to write test cases, require careful scrutiny finishing needs, draw the system level, within the module flow chart and identify various test points, and other demand was to brainstorm-like finish, this when the system has been tested to function very clearly, and then proceed to start writing test cases. So what's the general idea of ​​writing test cases is it? Write test cases by six months of experience, summarized below, if wrong place needs to be improved.

1, finishing analysis requirements document: Carefully read the requirements document again, and the record does not understand where the key test points, the overall draw simple flow chart. Then do it again, careful analysis of the function of each module, the module shown in the flow chart to find out all the features, and lists the major test points.

2, prepared by Example: according to different test business rules can be divided into four parts: the use case scenario, the system use case, function.

Example scenario use: the actual operation of the user logic design business use cases, not necessarily involving complex operations or logic, the user is most commonly used as a normal operation flow test scene design.

Example systems: is a detailed user scenarios, including normal scenes, scenes and the branch scenes abnormalities is a combination of two or more features from the associated scene.

Example functions with: business rules used to verify the function of each point, each of the interface elements and functions including business rules verification. The main function for a single point.

Step: Example scene with (keyword: Analog user actually operates): according to the flowchart shown within the module, the user's key business objectives described, comprising a complete system-level simulation scenarios and different user scenarios practical operation, several functions a combination of points can be considered user scenarios.

Step Two: systems each character system embodiment: flowchart drawn binding module, the system into a plurality of roles, each role and then divided into a plurality of tasks, each task is a system use case. Systems were divided into normal process, abnormal process, branched process, described in terms of a scene.

The third step: with the described logic rules function and a single point function page elements, hierarchical description logic rules refinement procedure as described in Example with logic rules directly.

The process of writing use cases there are some confusion:

Question 1: What method described the scene more clearly, and late changes to the demand and easy to maintain? 
Question 2: the relationship between test cases and test data, what is it? How to distinguish the two?

3, how to report class function modules written test case? Report class module substantially free traffic flow, the scene is not applicable law. In fact, a report class module is mainly to verify whether the correct query and display data based on the query conditions, and to ensure accuracy of the data. The test point can be divided into functional correctness verification test and report data.

The first step: preparation of inquiry with Example: search function can be decomposed into a plurality of test scenarios, results are expected to verify each scene. May be categorized as follows.

Scenario 1: By default the query results are correct;

Scene 2: Modify Search results correctly select the input conditions

1, enter the search (advanced search) page.

2, individually select each query options, such as: "All", "Category 1" and click "Search" correct query results.

3, a combination of various query options, such as: price + products, click on the "Search" correct query results.

Scenario 3: Modify the query results are correct input conditions

1, enter the search (advanced search) page.

2, one by one input text field conditions, the value of fuzzy query, click on "Search", the correct query results.

3, one by one input text field conditions, exact value, click "Search", the correct query results.

4, one by one input text field conditions, the Chinese value, click "Search", the correct query results.

5, one by one input text field conditions, large letters, lowercase value, click "Search", the correct query results.

6, one by one input text field conditions, the numeric value type, click "Search", the correct query results.

7, one by one input text field conditions, full-width, half-angle value, click "Search", the correct query results.

8. The composition of each text field query, click on "Search" correct query results.

Scenario 4: a combination of optional condition, the correct query result input condition Scenario 5: Error, empty record an empty result set

Step two: write additional function point test, the same function can be decomposed point multiple scenes.

The third step: write test cases to verify the correctness of the data: data to identify various factors that influence the report, citing a variety of data reports show, citing both write data to verify the correctness of the use cases.

Guess you like

Origin www.cnblogs.com/tangsong41/p/12572344.html