Professional Documents
Culture Documents
INGSW 05 A Casi Di Test
INGSW 05 A Casi Di Test
Ingegneria delSoftware
Prof. Alfredo Milani
Absence of defects:
– Example 1
...
a = … / (x +20) ...
...
Any value of x is ok, except for x = -20!
Difficulties
• For many qualities, it is not a binary (yes/no)
property
ANALYSIS
– analytic study of properties (es. Model checking, time
dependency) – it is a static and formal technique
Testing
• correctness defined by OR ⊆ D × R
– P(d) correct if the pair <d, P(d)> ∈ OR
– P correct if for each d ∈ OR all P(d) are correct
Definitions (2) Failure, Error, Fault
• FAILURE
– P(d) is not correct
may be undefined (error state) or may be the wrong result
• ERROR
– anything that causes a failure
Ex. typing mistake, programmer forgot to test “x = 0”
• FAULT
– incorrect intermediate state entered by program
• TESTING
– Try to increase the probability that the presence
of an error results in a failure
• DEBUGGING
– Try to identify faults as early as possible
Definitions (3) Test case, Test set
• Test case t
– an element of D
• Test set T
– a finite subset of D
• Test t is successful if P(t) is correct
• Test set T is successful if P correct for all t in T
• Criteria is complete
– if P is incorrect, there is a test set T of C that is not successful