CTFL 5.1.5: Apply test case prioritization
K3Syllabus section 5.1.5
3 original PrepBench practice questions for learning objective 5.1.5 of the CTFL 4.0 syllabus. Try the examples below and check each answer against its syllabus reference.
Practice questions
Question 1
Three test cases are scheduled. Their risk priorities and their dependencies are: TC1 — low priority; depends on nothing. TC2 — medium priority; depends on data created by TC3. TC3 — high priority; depends on data created by TC1. Which execution order runs each test case only after the test cases it depends on?
- TC3, TC1, TC2
- TC1, TC3, TC2
- TC1, TC2, TC3
- TC2, TC1, TC3
Show answer
- TC3, TC1, TC2TC3 runs before TC1, but TC3 depends on data that TC1 creates.
- Correct answer: TC1, TC3, TC2TC1 before TC3, and TC3 before TC2, as both dependencies require.
- TC1, TC2, TC3TC2 runs before TC3, but TC2 depends on data that TC3 creates.
- TC2, TC1, TC3TC2 runs first, before both TC3 and the TC1 that TC3 needs.
Ideally test cases are ordered by their priority levels, but that does not work when they have dependencies: if a test case with a higher priority depends on one with a lower priority, the lower priority test case must be executed first. Here TC3 depends on TC1 and TC2 depends on TC3, so TC1 must precede TC3 and TC3 must precede TC2. Only one of the four orders satisfies both, even though TC1 has the lowest priority of the three.
Syllabus section 5.1.5
Question 2
A team must order four test cases. Risk-based prioritization has been agreed: T1: risk level 12; statement coverage 40%; no dependency T2: risk level 30; statement coverage 15%; runs only after T4 T3: risk level 20; statement coverage 45%; no dependency T4: risk level 6; statement coverage 30%; no dependency Scheduling rule: if the highest-risk remaining test is blocked, run its prerequisite immediately. Which test case should be executed third?
- T3
- T1
- T2
- T4
Show answer
- Correct answer: T3The order is T4, T2, T3, T1, so T3 runs third.
- T1T1 is third in the pure risk order T2, T3, T1, T4, which ignores the dependency on T4.
- T2T2 carries the highest risk level, but the question asks which test runs third, not which matters most.
- T4T4 is third by statement coverage — 45, 40, 30, 15 — which is the competing prioritization strategy.
In risk-based prioritization the order of test execution is based on the results of risk analysis, and the test cases covering the most important risks are executed first, which by risk level alone gives T2, T3, T1, T4. However, this practice may not work if the test cases have dependencies: if a test case with a higher priority depends on one with a lower priority, the lower priority test case must be executed first. Under the stated scheduling rule, T2's prerequisite T4 runs immediately, so the order is T4, T2, T3, T1. The third test case executed is therefore T3.
Syllabus section 5.1.5
Question 3
A team uses additional coverage prioritization, in which each test case after the first is the one achieving the highest additional coverage. The test cases cover these requirements: TC1 covers R1, R2, R3 and R7. TC2 covers R3, R4 and R5. TC3 covers R1 and R2. TC4 covers R1 and R4. TC5 covers R2 and R6. TC1 is executed first, because it achieves the highest coverage. Which test case is executed second?
- TC2
- TC3
- TC4
- TC5
Show answer
- Correct answer: TC2TC2 adds R4 and R5, two requirements not yet covered.
- TC3TC3 covers R1 and R2, both of which TC1 has already covered.
- TC4TC4 adds only R4, which is less additional coverage than TC2 provides.
- TC5TC5 adds only R6, which is less additional coverage than TC2 provides.
In additional coverage prioritization the test case achieving the highest coverage is executed first, and each subsequent test case is the one that achieves the highest additional coverage. After TC1, the requirements R1, R2, R3 and R7 are covered. TC2 adds R4 and R5, which is two new requirements; TC4 adds only R4 and TC5 adds only R6; TC3 adds nothing, since R1 and R2 are already covered. TC2 therefore comes second.
Syllabus section 5.1.5
Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.