Beruflich Dokumente
Kultur Dokumente
3 BR-03 H Lock_03,04 2 1 1 50 3
4 BR-04 M Lock_05,06,07 3 2 1 67 5
8 BR-08 L 0 0 0 0 1
Total 8 12 10 2 83 12
Following observations can be made:
3.5
3
2.5
No. of Test Cases
6
5
4
Defecs
3 No. of defect
2
1
0
1 2 3 4 5 6 7 8
Requirements
II. POSITIVE AND NEGATIVE TESTING
The purpose of positive testing is to prove that the product
works as per specification and expectations. A product
delivering an error when it is expected to give an error is also
a part of positive testing.
Turn
BR-02 Key 123-456 Locked Unlock
anticlockwise
BR-04 Hairpin Turn clockwise Locked No change
Negative testing is done to show that the product does not
fail when an unexpected input is given. Negative testing
covers scenarios for which the product is not designed and
coded.
Negative test cases
S. Current Expected
Input 1 Input 2
No. state output
Some other lock’s Turn
1 Lock Lock
Key clockwise
Some other lock’s Turn
2 Unlock Unlock
Key anticlockwise
Thin piece of Turn
3 Unlock Unlock
wire anticlockwise
Possible reasons:
d
y
a b
x
300
y 200
100
Solution:
The Previous date program takes a date as input and checks it
for validity. If valid, it returns the previous date as its output.
With single fault assumption theory, 4n+1 test cases can be
designed and which are equal to 13.
The boundary value test cases are:
Example – 3
There are four additional test cases which are outside the
legitimate input domain. Hence total test cases in robustness
testing are 6n+1, where n is the number of input variables.
So, 13 test cases are:
(200,99), (200,100), (200,101), (200,200), (200,299), (200,300)
(200,301), (99,200), (100,200), (101,200), (299,200), (300,200),
(301,200)
400
300
y 200
100
Solution:
Solution:
Solution:
Solution:
1 ≤ month ≤ 12
1 ≤ day ≤ 31
1900 ≤ year ≤ 2025
Solution:
I1= {a: a = 0}
I2= {a: a < 0}
I3= {a: 1 ≤ a ≤ 100}
I4= {a: a > 100}
I5= {b: 0 ≤ b ≤ 100}
I6= {b: b < 0}
I7= {b: b > 100}
I8= {c: 0 ≤ c ≤ 100}
I9= {c: c < 0}
I10={c: c > 100}
Here test cases 5 and 8 are redundant test cases. If we
choose any value other than nominal, we may not have
redundant test cases. Hence total test cases are 10+4=14
for this problem.
Example 8
I1={month: 1 ≤ m ≤ 12}
I2={month: m < 1}
I3={month: m > 12}
I4={day: 1 ≤ D ≤ 31}
I5={day: D < 1}
I6={day: D > 31}
I7={year: 1900 ≤ Y ≤ 2025}
I8={year: Y < 1900}
I9={year: Y > 2025}
Inputs domain test cases are :
Example – 9
I1={x: x < 1}
I2={x: x > 100}
I3={x: 1 ≤ x ≤ 100}
I4={y: y < 1}
I5={y: y > 100}
I6={y: 1 ≤ y ≤ 100}
I7={z: z < 1}
I8={z: z > 100}
I9={z: 1 ≤ z ≤ 100}
Some inputs domain test cases can be obtained using the
relationship amongst x,y and z.
Steps
6. Causes & effects in the specifications are identified.
A cause is a distinct input condition or an equivalence class of
input conditions.
An effect is an output condition or a system transformation.
2. The semantic content of the specification is analysed and
transformed into a boolean graph linking the causes & effects.
3. Constraints are imposed
4. graph – limited entry decision table
Each column in the table represent a test case.
5. The columns in the decision table are converted into test cases.
The basic notation for the graph is shown in fig. 8
The test case result not only depend on the product for
proper functioning they depend equally on the infrastructure
for delivering is expected to still behave correctly and produce
the desired or expected results. The infrastructure
parameters could be fo hardware, software or other
components.