Beruflich Dokumente
Kultur Dokumente
CLO-1
Questions 1:
Please make control-flow graph, find path conditions and independent paths?
Path Conditions:
1. 1,2,3,4,6 ,5,7,8,10 (i<max ∧ value[i] >= min && value [i] <=max ∧
tv> 0 )
2. 1, 2,3,5,7,9,10 ( i<max ∧ value[i] <=min && value[i] >=max ∧
tv<0)
3. 1, 2, 7,9,10 (i>max ∧ tv < 0)
Independent paths:
1. 1, 2,3,4,6,5,7,8,10
2. 1, 2, 3, 5, 7,9,10
3. 1, 2, 7,9,10
Question 2:
Write test cases to provide all-nodes coverage and provide coverage
report?
Conclusion:
Statement coverage involves execution of all the executable statements in the
source code at least once.
Decision coverage reports the true or false outcomes of each Boolean expression
In the branch coverage, every outcome from a code module is tested Conditional
will reveal how the variables or subexpressions in the conditional statement are
evaluated