How to write high quality test cases

How to write high quality test cases

High quality standards:

1, cover all business logic (including normal and abnormal logic logic)
2, to cover all the typical user scenario
3, to cover all the needs of the points
4, targeted test, and the test procedure can be the fastest or testing purposes test time is very short
5, there is no redundancy use case
6, test cases can be shipped directly test strategy, policy specifies the module and the use cases can be very clear executors

How to achieve this goal:

One, logic-based case design process:

A, prepared by the process of Example:

1, FIG priority complete business logic required to draw angle in the test logic diagram above, comprising the complete stream of data input and output process, and he can understand why this treatment

2, according to their own understanding of each logical analysis process is perfect, if there are places not covered, and submit bug defect prevention

3, prepared according to the logic test to ensure that each is capable of covering a logic corresponding to Example

4, the process of writing the use case logic in thinking about how to improve the testing process of the use cases, such as: interface testing, automated test script. And, the ability to make the interface and debugging methods developed to provide a corresponding

5, in accordance with the embodiment of the principle of 10 minutes, i.e., can be performed to ensure complete within 10 minutes

B, with a review process Example:

1, first explain the entire business logic diagram, we need to ensure that reviewers for the entire business logic diagrams are very clear, and can understand why he did that

2, FIG analyze whether the entire business logic has not covered the case of a scene or branched (brainstorm way)

3, exception handling the situation analysis business logic (business logic whether each has to deal with abnormal situations, also brainstorm ways)

4, if the logic of the use case classification is reasonable, so that everyone can easily find the corresponding logical to use case

5, if all the logical analysis can be found with a corresponding embodiment (use cases find the corresponding logical), comprising a front logic does not take into

6, if there is redundancy analysis cases, if a plurality of the same logical are covered with the embodiment (including the step of testing and inspection points)

7, analysis test method according to whether there is improvement, whether directly through code static commuting, interface testing, automated testing (including scripting), the introduction of tools, etc. to further improve our efficiency test

C, Friendly reminder:

1, only the existing logic can ensure there is no problem, but without treatment results in partial failure may occur, can be supplemented cases covered by use cases and requirements behind the scenes

2, logic which is not sufficient to consider unusual circumstances, result in the test case is relatively lacking, you can brainstorm for each logical analysis of whether there are other unusual circumstances, and when this review focused review

3, R & D logic is likely itself is wrong, but if you follow the logic developed to write will result when the use case there are problems, reach the purpose of the test, so it is necessary to advance from the perspective of requirements and design of whether the logic in question

4, during the research and development of logic may change relatively quickly, this will lead to a logical test cases must often change, so it is necessary to ensure the development of the code is consistent with the design, and the logic is carried out according to the design as much as possible

Further, with the embodiment of the logic design in the latter stage of encoding, such changes will be less

Second, based on the scene case design process:

A, prepared by the process of Example:

1, to find out the customer's original requirements, Why do we need this function, what can bring value to customers is

2, a typical user scenario requirements specification to view the inside of the customers, and integrated into the inside of a scenario of

3, further analysis on the basis of requirements specification on which customers may also have practical usage scenario (mainly the entire customer topology)

4, the customer will be how to configure the module to meet what demand (brainstorming)

5, during which customers will be operating (brainstorming)

B, with a review process Example:

1, arrange modules experts, managers and executives planning to review, is to analyze what the scene might have not taken into account, it is better to have a specific customer

2, to explain the arrangement of the module, thus ensuring the responsible use cases to module scenario is very familiar with, and the process of analyzing whether there may be other cases, to further improve the use case scenarios

C, Friendly reminder:
1, the module is user scenes as real customers, rather than out of their own yy
2, the module is a complete user scenarios best customers in the process, rather than one spot.
3, not all of the modules We have a scene with cases

Third, based on the needs of the case design process:

A, prepared by the process of Example:

1, reference demand schedule, and control the front logical use cases and scenarios use cases, examine whether to cover all the needs analysis does not cause lower, if the logical use cases or scenarios for example considers not sufficient, are then added to the above, is not the case then added with the demand inside EXAMPLE

2, full use of the related art cases written, comprising: a boundary value analysis, analysis of equivalence classes, reckoning error class, a path covering method, causal analysis, analysis method and the like orthogonal

3, use case analysis is able to be covered by automated or other means of testing

B, with a review process Example:

1, the control table needs to view it, whether to cover all, not only the test case, and further comprising the step of testing the results desired, avoid the development of dependency logic to cause problems Design Example

2, the moiety is reviewed with the foregoing embodiment of the redundant logic use cases and scenarios use case

3, use case analysis is able to be covered by automated or other means of testing

C, Friendly reminder:

1, based on use cases only for supplemental use cases previously not covered, so this part of the use case needs to be relatively small, if we find more, then can be analyzed under the R & D of whether some logic not covered by the relevant local

Fourth, the test module described method (Example improve the efficiency of use of the module):

1, FIG service logic module into the specified directory with the embodiment, so that convenience to explain reviewers, and related personnel to learn later

2, and the positioning of the troubleshooting method to the module out and placed in the specified directory, troubleshooting personnel can effectively guide the back and Orientation

3, the focus of the test module and test ideas to come out and placed in the specified directory, can effectively guide the module test strategy

I'm going to collection coupon 591q.cn

Guess you like

Origin blog.csdn.net/zfs1570/article/details/85478328