Suppose program P has been executed against a test suite T consisting of five te
ID: 3685008 • Letter: S
Question
Suppose program P has been executed against a test suite T consisting of five tests, t1, t2, t3, t4, t5 and t6. A total of six entities are covered by the tests as shown in the following table: 0 (or 1) in a column indicates that the corresponding entity is not covered (or covered). The entities could be basic blocks in the program, functions, def-uses, or any other testable element of interest. Follow procedure CMIMX to find the minimal cover set for the six entities. ----------------------------- 1 2 3 4 5 6 ----------------------------- t1 0 1 0 1 0 1 t2 1 0 0 0 1 0 t3 1 1 0 1 0 0 t4 1 0 1 0 0 0 t5 0 1 0 1 1 0 t6 1 0 0 0 0 0 -----------------------------
Explanation / Answer
Function in parameters: matrix M of r rows and c columns (matrix r X c )
Columns represent the test entity to be tested like functions, testable elements
Rows represent test cases or tests of the test suite
Parameters sent out of the method or function:
Minimum Cover (minmCvr) required from i1 to ig in such a way that for every column in the matrix M, there exists a minimum of one positive item in atleast one of the rows belonging to minmCvr
stage 1: let minmCvr = theta
notYetCovered = column c
Stage 2: every 6 tests and 6 test entities are to be noted
Stage 3: do the following as long as notYetCovered is positive
sub stage 1 of 3: look for columns with least 1s ( as 1 = covered)
sub stage 2 of 3: assume r1 as one of the rows for which elements exists
sub stage 3 of 3: flag the test t , include that in minmCvr
notYetCovered = notYetCovered – test Entities covered by r1
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.