Software Test Practice-Test Case Design method

Source: Internet
Author: User

First, test analysis
    1. Test demand sources

Development requirements Dr; Agreement standard requirements PR; user demand ur; case base requirements LR; competition demand CR; Sr. demand for succession;

2. Test Item Analysis Steps

A. Number of test items for analysis;
B. Annotated source: Development documentation/Legal terms/Case Library number
C. Consolidate test items: Delete merged duplicate test items; Large test items are decomposed into test sub-items;
D. Analysis of the relationship between test items;

3. Test and Analysis methods

A. Quality model Analysis Method: Functional test items, efficiency test items, reliability, ease of use, maintainability, portability;
B. User scene analysis method: Tourists, ordinary users, VIP users, administrator users, different role permissions, test points are different;
C. Inheritance analysis: New features, inheritance of old functions, the relationship between old and new functions, the degree of influence;
D. Functional interaction Analysis: between function point and function point, timing (parallel, serial), primary passive;

4. Prioritize test items

5. Test design: Train of thought-test is not poor, according to some design methods to select some data to cover multiple test points as far as possible;

second, the test design1) black box test case design Technology 1. Equivalence class Partitioning

concept: the input/output domain is divided into several subsets, from which to select the representative data, if the selected data test is not a problem, it is considered that the data test is not a problem;

related terms : Valid equivalence class/invalid equivalence class (whether the input data is meaningful, whether it is legal, is correct)

principle : A. If the input (output) is a range of values or the number of values, then divide a valid equivalence class, two invalid equivalence classes;

B. If the input (output) is a finite set or what must be the condition or Boolean value, it is divided into a valid equivalence class and an invalid equivalence class;

C. If the input (output) has been divided into valid equivalence class and invalid equivalence class, for the effective equivalence class specific values have different processing results and methods, then divided into a number of valid equivalence classes and an invalid equivalence class;

D. If the input (output) to satisfy multiple conditions at the same time, then divided into a valid equivalence class and a number of invalid equivalence classes (from different angles violate the rules);

Step: divide SRS into specification fragment → find input condition → equivalence class division → divide each equivalence class number → Select representative data design use case → until all equivalence classes are overwritten;

PS: Writing use case principle: a test case should cover as many valid equivalence classes as possible && a test case only covers an invalid equivalence class;

2. Boundary value Analysis

concept: The Boundary value analysis method is a supplement to the equivalence class partitioning method, and a large number of empirical data show that the boundary is a problem-prone area, and if there is no problem in the boundary test, the probability of internal data problem is small.

related terms : points above the points on the boundary; point of departure → closest to the boundary (closed interval, off point outside the boundary, open interval is within the boundary); interior points → any point within the boundary;

principle : A. If the input (output) is a range of values or the number of values, then the boundary or the value near the boundary as the test case data selection;

B. If the input (output) is an ordered set, the first element and the last element are selected as test case data;

C. If the number of input (output) value is a range of values, the maximum value, the maximum value +1, the minimum value, the minimum value 1 as the test case data selection;

D. If it is an internal data structure, the limit value is chosen as the test case data;

Step : Divide SRS into specification fragment → find input condition → equivalence class division → divide each equivalence class number → analyze each data type, determine whether there is boundary value → generate use case;

PS: Only equivalence classes and boundary values can generate the final test case, and other test design methods generate test rules or test paths (logical test cases)

3. Decision Table

Concept: a tool for analyzing and expressing various input conditions for different combinations to accomplish different actions, in order to analyze the condition combination of complex logic relations;

related terms : Conditional pile (input), condition item (input value case), action pile (output), action item (output value case)

Step : Divide SRS into specification fragment → find the condition pile, condition item, action pile, action item → Set the rule number by arranging the condition item → merging simplification → design the final use case;

features : A. Make up the case that the equivalence class does not consider the combination;
B. is a full array of combinations, testing more comprehensive;
C. The number of test rules is large, the number of test cases is huge, resulting in large testing workload;
D. The merger is risky, and simplification requires caution;
E. The need to be able to find the requirements of the specification of the requirement not logical;
F. The need for a more complex logic relationship is not competent;

Scope of application : Functional testing;

4. Causality diagram

concept : to transform the requirements of complex logic relationships into a method of intermediate systematization of decision tables. The purpose is to obtain a judgment table;

related terms : cause (condition), fruit (action);

Logical Relationship : A. Causality: identity/non/and/or;

B. Between reasons: E (exclusion: Up to one is true), I (inclusive: At least one is true), O (single: There and only one is true), R (requires: A is true, B needs to be true), M (mandatory: A is true, B needs to be false)

Intermediate node : When the relationship between multiple inputs is not purely a relationship with, or, using intermediate nodes to access intermediate results;

When multiple inputs are describing the same thing, the intermediate nodes can be used to merge the logic;

Step : Divide SRS into specification fragment → analyze cause and result → plot cause and effect diagram → judgment restriction relationship → generate decision table → merge delete → design use case

features : A. Make up the case that the equivalence class does not consider the combination;

B. is a full array of test methods, the test is more comprehensive;

C. The number of test rules is large, the number of test cases is huge, resulting in large testing workload;

D. Be able to identify the requirements in the requirements specification that are not in accordance with logic;

E. The need to be able to analyze complex logical relationships;

F. Restrictive relationships can quickly eliminate illogical rules, thus improving the efficiency of test design;

5. Orthogonal experimental method

Concept : A method of testing with orthogonal tables is a 22-combination method, and experience shows that if there are no problems with the 22 combination test, it is considered that the probability of the problems of other combinations is small.

features : 22 combination; direct apply; economical and efficient;

related Terms : factor (input), state (level: input value)

Step : Divide SRS into specification fragment → find factor and state → construct factor state table → weighted filter → apply orthogonal table → add/delete to generated combinations → design use cases

Scope of application : Functional test, configuration test

6. State Migration Diagram (dot to point, internal path is non-cyclic)

concept : To test the state of a finite state machine and a valid jump condition, the purpose is to test that all States can jump and migrate according to the correct conditions. Do not have non-covered status and illegal jumps;

finite state machines : Web pages, embedded systems

related terms : status (performance after a certain point in time or instruction), Jump condition (action/instruction), event (output)

Step : Divide srs into spec fragment → find status and jump condition → set initial state, draw state Migration Diagram → event conversion table → State transformation tree → test path → add illegal path → design use case

7. Process Analysis Method (end-to-end, internal path can be recycled)

Concept : A method for analyzing and testing the business process of the whole software system, which is based on the statement coverage test method in the white box test;

related terms : nodes (one function point), arrow lines (connection route between function points)

Step : Analyze srs→ find main function point → draw skeleton diagram (Basic stream) → Refine branch → make path combination to prioritize

8. Input domain override method

There are three main points: Intermediate value test (equivalent to Interior point), extreme value test (upper point in the boundary), special value test (business-related, according to software function)

9. Output domain Override method

The equivalence class and boundary value of the output domain are analyzed, the equivalent class and the output domain boundary values are reached, and the test method needs to have a special and in-depth understanding of the function of the system, which is generally used in the industry.

10. Anomaly Analysis Method

The system has the possibility of abnormal operation to test, mainly for the fault-tolerant system, fault recovery ability to test;

11. Error-Guessing method

Based on experience, it is an empirical test method that complements other test methods and is not used alone

2) White box test case design Technology
    1. Statement overrides
    2. Decision coverage
    3. Conditional override
    4. Decision-Conditional override
    5. Conditional combination Overrides
    6. Path Overlay

See Test coverage: http://www.cnblogs.com/Carolinee/p/5404675.html

Software Test Practice-Test Case Design method

Related Article

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.