TL;DR
In the previous posts, we presented your coverage criteria exercise to recap that topic. Today we answer questions from that exercise. We will introduce you to software testing based on the remarkable book, Introduction To Software Testing by Paul Ammann and Jeff Offutt.
C1 coverage criteria are sanitizer type, C2 coverage criteria are sanitizer color.
- Write test requirements TR1 and TR2 for C1 and C2.
TR1 = {type = ‘hands’, type = ‘surface’, type = ‘electronics’}
TR2 = {color = ‘transparent’}
2. Write test sets T1 and T2 that satisfy C1 and C2.
T1 = {‘hand sanitizer’, ‘surface sanitizer’, ‘electronics sanitizer’, ‘bathroom sanitizer’}
T2 = {‘hand sanitizer’, ‘bathroom sanitizer’}
3.. Does C1 subsume C2?
Yes.
4. Does T1 satisfy C2? Explain.
Yes. Because all sanitizers are transparent. This follows from test requirements.
5. Does T2 satisfy C1? Explain.
No. Because we have only two test set elements that satisfy C2 but do not satisfy all TR1.
6. If T2 reveals the fault, T1 does not necessarily also reveal the fault. Explain.
Criteria subsumption is not about test sets subsumptions. So we could have T1 and T2, where T2 reveals the fault, but at the same time, T2 does not need to be subsumed in T1.
7. How well could we compare test criteria besides subsumption?
Fault detection ability. We could use an analytical and experimental approach. In the analytical approach, we have certain test criteria that could find certain types of faults. In the experimental approach, we introduce bugs on purpose. One example is the mutation. We then measure does test criteria find introduced bugs.
The number of tests needed to satisfy the criteria. More tests could mean more extensive coverage, but also could mean more expensive testing.