Equivalence class partitioning method of "software testing"

Source: Internet
Author: User

  • Introduction to Methods
    • Definition: is to divide all possible input data, that is, the input field of the program into several parts (subsets), and then select a few representative data from each subset as the test case. This method is an important and common black box test case design method.
    • Partitioning equivalence classes: equivalence classes refer to subsets of an input field. In this sub-collection, each input data is equivalent to the error in the disclosure program, and it is reasonable to assume that: testing the representative value of an equivalence class is equal to the test of this class of other values, therefore, all input data can be reasonably divided into several equivalence classes, Taking one data in each equivalence class as the input condition of test can get good test result with a few representative test data. Equivalence classes can be divided into two different cases: valid equivalence class and invalid equivalence class.
      • Valid equivalence class: Refers to a set of input data that is reasonable and meaningful for the specification of a program. The effective equivalence class is used to verify whether the program implements the functions and performance specified in the specification.
      • Invalid equivalence class: the definition of a valid equivalence class happens to be the opposite. An invalid equivalence class refers to a set of input data that is unreasonable or meaningless for a program's specification.   For a specific problem, the invalid equivalence class should have at least one or more. When designing test cases, consider both of these equivalence classes. Because the software is not only able to receive reasonable data, but also to withstand the unexpected test, such testing to ensure that the software has a higher reliability.
    • Methods for dividing equivalence classes
      • A valid equivalence class and two invalid equivalence classes can be established if the input conditions specify the range of values or the number of values.
      • A valid equivalence class and an invalid equivalence class can be established if the input condition specifies a set of input values or a condition that stipulates "What must be".
      • In the case where the input condition is a Boolean, a valid equivalence class and an invalid equivalence class can be determined.
      • In the case of a set of values that specify the input data (assuming n), and the program is going to handle each input value separately, you can establish n valid equivalence classes and an invalid equivalence class.
      • A valid equivalence class (conforming to a rule) and several invalid equivalence classes (violating the rules from different angles) can be established in the case of rules that require the input data to be complied with;
      • The equivalence class should be further divided into smaller equivalence classes in the case that the various elements in the class are in different ways in the program processing.
    • After establishing the equivalence class, the design test case can establish the equivalence class table, list all the equivalence class input conditions that are divided: valid equivalence class, invalid equivalence class, and then design the test case according to the following three principles from the divided equivalence class:
      • A unique number is specified for each equivalence class;
      • Design a new test case so that it overwrites as much of the valid equivalence class as it has not yet been overwritten, repeating this step until all valid equivalence classes are overwritten;
      • Design a new test case to overwrite only one invalid equivalence class that has not yet been overwritten, repeating this step until all invalid equivalence classes are overwritten.

Equivalence class partitioning method of "software testing"

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.