Question 1
IntermediateWhite-Box Test Techniques · TTA-2.8.1 (K4) Select an appropriate white-box test technique according to a given project situation
You are a Technical Test Analyst reviewing a C++ module for an industrial control system that manages a chemical mixing process. The system is rated at IEC 61508 SIL 2. You encounter the following code snippet:
void process_batch(float temperature, int pressure, bool valve_open) {
if ((temperature > 150.0f && pressure < 500) || valve_open) {
initiate_emergency_shutdown();
}
normal_processing();
}
Given the SIL 2 rating, which white-box coverage level does IEC 61508 rate as highly recommended (normally treated as mandatory) for this function, and what is the minimum number of test cases required to achieve it?
Answer and explanation
Correct answer: A
The CTAL-TTA syllabus table for IEC 61508 shows that at SIL 2 only 100% statement coverage is Highly recommended, which in practice is treated as mandatory; 100% branch (decision) coverage and 100% MC/DC are only Recommended, which many practitioners treat as optional with a rationale. Statement coverage needs every statement executed. One test where the decision is TRUE (for example temperature=160, pressure=400, valve_open=false) runs initiate_emergency_shutdown() and then normal_processing(), so a single test case reaches 100%. Decision coverage (2 tests), MC/DC (4 tests, N+1 for 3 conditions) and multiple condition coverage (up to 8 tests) go beyond what SIL 2 makes mandatory.
