comscie thoery Flashcards
Ideal testing strategy:
▪ Run program using all possible inputs
▪ Compare actual outputs to expected outputs
what type of test is this?
Exhaustive testing
A subset of values in the input domain is used for testing.
▪ Important to ensure that values are distributed over input
domain
▪ Can use random number generation.
what type of test is this?
Random testing
Group input values into sets of values
with similar expected behaviour and choose candidate value
def Threshold(val):
if val>10000: val=10000
return val
▪ e.g.
(100, -90, 1000)
(40000, 100000)
Equivalence classes
: choose values at, and on either
side of, the boundaries of the equivalence classes–
▪ e.g. 9999, 10000, 10001
def Threshold(val):
if val>10000: val=10000
return val
Boundary value analysis
- In the context of Python functions, what does pass-by-value mean?
A. The function accepts only numeric arguments, either integers or floating point values.
B. The function does nothing.
C. The function returns an integer value.
D. Parameters are copied and only the copies are changed in the function.
D
who is the father of computer science
Alan Turing (1912-1954)