Sie sind auf Seite 1von 5

ASSIGNMENT # 1

CLO-1

Aymal Khalid Khan


Software Quality Engineering Tuesday, May 26, 2020
01-131172-005  BSE_VI
Software Quality Engineering Sir Dr.Tamim Iqbal BSE-6

Questions 1:
Please make control-flow graph, find path conditions and independent paths?

Control Flow Graph:

BSE_VI Aymal khalid Khan 01-131172-005


Software Quality Engineering Sir Dr.Tamim Iqbal BSE-6

 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?

BSE_VI Aymal khalid Khan 01-131172-005


Software Quality Engineering Sir Dr.Tamim Iqbal BSE-6

 {[Array], min, max; output}


Test Case 1:
 T1= {[3, 4, 5, 6, 7], 3, 7; 5.0} at boundaries.
Coverage Report:
 Number of executed statements= 13, Total number of statements=15
 Statement Coverage: 13/15 = 86%
Executed Path:
 1, 2, 3, 4,6,5,7,8,10
Test Case 2:
 T2= {[3, 4, 5, 6, 7], 0, 1;-999}, out of boundaries
Coverage Report:
 Number of executed statements = 8, Total number of statements= 15
 Statement Coverage: 8/15 = 53%
Executed Path:
 1, 2, 7,9,10
Test Case3:
 T3= {[3, 4, 5, 6, 7], 4, 6; 4.75} within boundaries
Coverage Report:
 Number of executed statements =12, Total number of statements=15
 Statement Coverage: 8/15 = 80%
Executed Path:
 1, 2, 3, 5, 7,9,10

Test Case Table:

Test Values of Output Decision Branch Statement


Case Functions Coverage Coverage Coverage

1 [3, 4, 5, 6, 7], 3, 7 5.0 90% 85% 86%

2 [3, 4, 5, 6, 7], 0, 1 -999 50% 60% 53%

3 [3, 4, 5, 6, 7], 4, 6 4.75 80% 75% 80%

BSE_VI Aymal khalid Khan 01-131172-005


Software Quality Engineering Sir Dr.Tamim Iqbal BSE-6

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

Aymal Khalid Khan


01-131172-005
Umar Farooq
01-131172-030
BSE_VI
Software Quality Engineering
Dr. Tamim Iqbal

BSE_VI Aymal khalid Khan 01-131172-005

Das könnte Ihnen auch gefallen