Elementary comparison testing
Elementary comparison testing (ECT) is a formal white-box, control-flow, test-design method. Its purpose is to implement the detailed testing of complex and important software. Software pseudocode or code is tested to assess the proper handling of all decision outcomes. As with multiple-condition coverage and basis path testing, coverage of all independent isolated condition paths is accomplished through modified condition/decision coverage (MC/DC). Isolated conditions are aggregated into connected situations creating test cases. The independence of a condition is shown by changing the condition value in isolation. Each relevant condition value is covered  by test cases. A test case. A test case consists of a logical path from start to end of a process, through one or many decisions. Contradictory situations are deduced from the test case matrix and excluded. The MC/DC approach isolates every condition, neglecting all possible subpath combinations and path coverage. where The decision formula_2 consists of a combination of elementary conditions formula_3 formula_4 formula_5; formula_6 The transition function formula_7 is defined as formula_8 Given the transition formula_9 formula_10 formula_11 formula_12 formula_13 the isolated test path formula_14 consists of formula_15 formula_16 Test case graph. A test case graph illustrates  all the necessary independent paths (test cases) to cover all isolated conditions. Conditions are represented by nodes and condition values (situations) by edges. All program situations are addressed by an edge. Each situation is connected to one preceding and successive condition. Test cases might overlap due to isolated conditions. Inductive proof of number of condition paths. The elementary comparison testing method can be used to determine the number of condition paths by inductive proof. There are formula_17 possible condition value combinations formula_18. When each condition formula_19 is isolated, the number of required test cases formula_20 per decision is: formula_21 formula_22  there are <math>0<e edges from parent nodes formula_19 and formula_24 edges to child nodes from formula_19. Each individual condition formula_19 connects to at least one path formula_27 from the maximal possible formula_28 connecting to formula_29 isolating formula_29. All predecessor conditions formula_31 and respective paths are isolated. Therefore, when one node (condition) is added, the total number of paths, and required test cases, from start to finish increases by: formula_32 Q.E.D. Example. This example shows ETC applied to a holiday booking system. The discount system offers reduced-price vacations. The offered discounts are formula_33 for members or for  expensive vacations, formula_34 for moderate vacations with workday departures, and formula_35 otherwise. The example shows the creation of logical and physical test cases for all isolated conditions. Pseudocode Factors formula_38 possible combinations (test cases). Step 1: Decisions. formula_39 formula_40 Step 2: MC/DC Matrix. The highlighted diagonals in the MC/DC Matrix are describing the isolated conditions: formula_41 all duplicate situations are regarded as proven and removed. Step 3: Logical test-Case matrix. Test cases are formed by tracing decision paths. For every decision formula_42 and an end formula_43: formula_44 Step 4: Physical test-case matrix. Physical test cases are  created from logical test cases by filling in actual value representations and their respective results. Test-case graph. In the example test case graph, all test cases and their isolated conditions are marked by colors and the remaining paths are implicitly passed.