{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

a1-rest

a1-rest - Software Testing Quality Assurance&...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Software Testing, Quality Assurance & Maintenance (ECE453/CS447/SE465): Assignment 1 Solutions Patrick Lam I’ve excluded solutions for questions 2, 3 and 7. I’ll try to make them available later, but they won’t help you with midterm preparation anyway. The CFG in this version has been slightly corrected; thanks to Daqiang Mo for pointing out an error. Question 1 (5 points) (Section 1.3, Q1): Suppose that coverage criterion C 1 subsumes coverage criterion C 2 . Also suppose that test set T 1 satisfies C 1 on program P and test set T 2 satisfies C 2 , also on P . • (5 points) If P contains a fault, and T 2 reveals the fault, T 1 does not necessarily also reveal the fault. Explain. Recall that when a test suite satisfies a coverage criterion, it must address each test requirement generated by the coverage criterion. Let’s say that criterion C 2 contains test requirements A , B and C . Test set T 2 satisfies C 2 and also “accidentally” meets test requirement Z . Criterion C 1 must contain test requirements A , B , C , and perhaps also D , but nothing requires C 1 to contain Z . If Z contains the fault, then T 1 might or might not reveal the fault; both C 1 and C 2 are silent about Z . Question 4 (5 points) (Section 2.3, Q4) Consider the pattern matching example in Figure 2.21. In particular, consider the final table of tests in Section 2.3. Consider the 1 variable iSub . Number the (unique) test cases, starting at 1, from the top of the iSub part of the table. For example, ( ab,c,- 1) , which appears twice in the iSub portion of the table, should be labelled test t 4 . • Give a minimal test set that satisfies all defs coverage. • Give a minimal test set that satisfies all uses coverage. • Give a minimal test set that satisfies all du-paths coverage. Note that Table 1 by itself is insufficient for answering this question; you need to combine Table 1 and Table 2. Recall that the textbook puts uses for conditionals on both branches; I like to put the use at the branch point, so either convention is OK, as long as you’re consistent. (A couple of you onlyeither convention is OK, as long as you’re consistent....
View Full Document

{[ snackBarMessage ]}

Page1 / 7

a1-rest - Software Testing Quality Assurance&...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online