forked from rootusercop/IMP-Interview-Questions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Testing
32 lines (26 loc) · 1.61 KB
/
Testing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Question 1: Your test randomly changes the comparison operators in your conditionals. This is which kind of testing?
Mutation test
Glass-box test
Black-box test
Fuzz test
Source: http://www.careercup.com/question?id=14921914
Mutation test:
Fault-based Testing: directed towards “typical” faults that could occur in a program
• Basic idea: – Take a program and test data generated for that program
– Create a number of similar programs (mutants), each differing from the original in one small way, i.e., each
possessing a fault • e.g., replace addition operator by multiplication operator
– The original test data are then run through the mutants
– If test data detect all differences in mutants, then the mutants are said to bedead, and the test set isadequate
http://www.uio.no/studier/emner/matnat/ifi/INF4290/v10/undervisningsmateriale/INF4290-Mutest.pdf
http://www.techopedia.com/definition/20905/mutation-testing
Glass-box test(Also called clear box testing, open box testing): http://www.tutorialspoint.com/software_testing_dictionary/glass_box_testing.htm
Black-box test: http://stackoverflow.com/questions/402161/black-box-vs-white-box-testing
Fuzz test: http://en.wikipedia.org/wiki/Fuzz_testing
Question 2: Which of the following guarantees that you have exhaustively unit-tested a piece of code?
a. 100% C0 (statement) coverage
b. 100% C1 (branch) coverage
c. 100% C2 (path) coverage
d. None of the above
Question Source: http://www.careercup.com/question?id=14946838
Answer: None of the above. Testing is hard.
You could have tried every path, but not with every set of input values.