First, equivalence class division:
Example: an input box that allows 1 to 6 English characters or numbers, ending with OK. Valid equivalence classes:
Length: 1 to 6
Character: a-z,a-z,0-9
Invalid equivalence class
Length: 0,7
Characters: English/numeric characters, control characters, punctuation
From the above:
< Span style= "FONT-SIZE:14PX;" > enter |
valid equivalence class &NBSP; |
invalid equivalence class |
|
length is 1 to 6 bits consists of characters (A-Z, A-Z) and Numbers (0-9) |
length >6 null space control characters punctuation |
Test Case:
Number |
User name |
Expected output |
1 |
User01 |
Normal |
2 |
User |
Error output |
3 |
User00011111 |
Error output |
4 |
|
Error output |
5 |
Us 01 |
Error output |
6 |
us01# |
Error output |
7 |
US01, |
Error output |
Second, cause and effect diagram:
Example: Product Description: There is a vending machine software that handles boxed drinks with a unit price of 1.5 yuan. If you invest 1.5 yuan coins, press "Cola", "Sprite", or "black tea" button, the corresponding drink will be sent out. If you invest in a 2-dollar coin, return the 5-point coin at the same time you send the drink.
Analysis:
Reason: ① put 1.5 yuan coins, ② put 2 yuan coins; ③ Press "Cola" button; ④ Press "Sprite" button; ⑤ Press "black tea" button. Middle Status: ① has been cast, ② has been button. Results: ① returned 5 cents, ② sent "cola" drink ③ Sent "sprite" Drink, ④ sent "black tea" drink.
Exercises on equivalence class division and causality diagram