Software Testing - Black Box Testing: Equivalence Class Division

equivalence class division

References:
Software Testing Method_Equivalence Class Partition Equivalence
Class Design Test Case
Software Testing Lecture 8_Test Process_Test Case (Equivalence Class Partition)

The core of the entire equivalence class division method is: how to divide equivalence classes, how to distinguish valid equivalence classes from invalid equivalence classes, and how to determine test cases based on equivalence classes.
Viewpoint: How to classify the input data. (if judges what to put inside)

  1. Divide equivalence classes Equivalence
    classes refer to a set of input domains. If one input condition in the set is used as test data to test, no errors in the program can be found, then it is impossible to find errors in the test using other input conditions in the set. Any test case in the equivalence class can be used to replace all of them.
    The division of a set is divided into a set of subsets that are mutually disjoint, and the union of the subsets is the entire set. (Completeness, no redundancy)
  2. Distinguish between effective equivalence classes and invalid equivalence classes
    Effective equivalence classes: Refers to the set of input data that is meaningful and reasonable for the specification of the program. Valid equivalence classes can be used to verify whether the program implements the functions and performance specified in the specification (validation process). Carefully observe the conditions of the topic.
    Invalid equivalence class: refers to the set of input data that is unreasonable or meaningless for the specification of the program. The invalid equivalence class can be used to test the abnormal handling ability of the program for invalid data (testing process). The opposite case to the title condition (effective equivalence class).
  3. Determine the equivalence class
    The key to this step is to judge the type of the input condition.
    a. If the input conditions specify the range of values ​​or the number of values, one valid equivalence class and two invalid equivalence classes can be established.
    b. When a set of values ​​of input data (assumed to be n) is specified, and the program is to deal with each input value separately, n effective equivalence classes and one invalid equivalence class can be established.
    c. In the case where the input condition specifies a set of input values ​​or specifies a "must be" condition, a valid equivalence class and an invalid equivalence class can be established.
    d. In the case where the rules that the input data must comply with are stipulated, a valid equivalence class (conforming to the rules) and several invalid equivalence classes (violating the rules from different angles) can be established.
    e. When it is known that each element in the divided equivalence class is processed in a different way in the program, the equivalence class should be further divided into smaller equivalence classes.
  4. Identify test cases
    a. Specify a unique number for each equivalence class.
    b. Design a test case to cover as many valid equivalence classes as possible that have not been covered until all valid equivalence classes are covered. (It only needs to appear once)
    c. Design a new test case to cover only one invalid equivalence class until all invalid equivalence classes are covered.
  5. Case Analysis
    When registering a mailbox, the mailbox name requires 6 to 18 characters. Letters, numbers, and underscores can be used, and it must start with a letter.
    case analysis
    equivalence class table
    test case

Guess you like

Origin blog.csdn.net/Bat_Reality/article/details/123931871