The following are purely personal understandings, and if anything is wrong, please contact us for more advice.
There are references (http://wenku.baidu.com/link?url=R47d3QatLS8UsDWNIlSEOyvgVNFiLr8AZnhiPJ7_ur_sH4xoeZUfjFhL4zjE0P6bpDtqx3L9_ 2JLRNMJGJJLPGE-5YCRRQBAJ1ZEZCKHFUM)
4. Why is the equivalence class divided? What principles should be followed for equivalence class partitioning?
Answer: The use of equivalence class test method can greatly reduce the number of test cases, so as to improve testing efficiency. Features: Completeness-----The individual equivalence classes (subsets) are not the complete set of input/output, that is, the defined domain/range of the program; no redundancy--each equivalence class is a subset of disjoint groups; equivalence--Each subset of the partition is determined by the equivalence relationship, that is, the individual input data is equivalent to the error in the
Principle: 1 A valid equivalence class and two invalid equivalence classes can be established under the condition that the input conditions stipulate the range of values;
5) In the case of a set of values that specify the input data (assuming n), and the program is to handle each input value separately, it can establish n valid equivalence class and an invalid equivalence class; 6) in the case that the input data must obey the rules, a valid equivalence class and several invalid equivalence classes can be established.
5. For the following issue: A 8-bit computer whose hexadecimal constants are defined as hexadecimal integers beginning with 0x or 0X with a range of -7f~7f (case-insensitive letters), such as 0x11, 0x2A, and -0x3c, design test cases using the equivalence class partitioning method.
Answer: min=-7f max=7f
Value valid equivalence class:-7f<=value<=7f; invalid equivalence class:value< -7f,value > 7f;
6. Assume that an ATM machine allows the extraction of cash in increments of $50 with a total amount ranging from 100~2000 (including 2000), Test with equivalence class method and boundary value analysis.
Answer: min=100 max=2000
The value money valid equivalence class:100<=money<=2000; (money is a multiple of 50) is invalid equivalence class: Money<100,money>2000,money is not a multiple of 50.
Test Case:
7. There is a grade management system for primary school students, which requires students with good grades to put in front of them, each of which has a curriculum score of: Chinese, maths, English. First of all, according to the overall score of individuals ranked, if the total of two people are equal in accordance with their language scores ranked, if the score and language scores want to be the same, then according to their mathematical performance rankings, please use the equivalence class method to rank.
Answer: Total, language: Chinese, Math: Math, English: 中文版
Valid classes: TA≠TB, ranked by total overall score Ta=tb && CA≠CB, ranked by language (Chinese) ta=tb && ca=cb && ma≠mb by Math score (math);
Invalid class: Ta=tb && ca=cb && ma=mb.
Study questions: There are 20 inputs, 3 of which are multi-defect, 17 are single defects, and the total number of test cases is obtained.
Answer: Weak general equivalence class test: 17+3=20
Strong general equivalence class test: 17*3=51
Weak robust equivalence class test: 3x17+3x3x3=78
Strong and strong equivalence class test: 3x17*3x3x3=1377
Report:
Weak general equivalence class: the single defect hypothesis, does not discuss the exception area strong general equivalence class: The multi-defect hypothesis, does not consider the anomaly region weak robustness equivalence class: The single flaw hypothesis, must consider the anomaly region strong robust equivalence class: the multi-flaw hypothesis, must consider the anomaly region;
Software Testing technology----black box testing