In a particular avionics system a radar altimeter is used to determine the height above the ground level (or AGL for short). One of the software components uses the radar altimeter height measurement (radarHeight) to determine if we are within 50’, between 50’ and 200’, between 200’ and 500’, or above 500’ using the following low-level requirement:
IF (radarHeight < 50.0)
THEN Below50Function()
ELSE IF (radarHeight < 200.0) THEN Between50And200Function()
ELSE IF (radarHeight < 500.0) THEN Between200And500Function()
ELSE Above500Function()
ENDIF
Design the test cases necessary to verify this requirement! How do your test cases satisfy MC/DC?
The test cases necessary to verify the given requirement are as follows:-
Test Case | Input | Function Call |
---|---|---|
1 | 49.0 | Below50() |
2 | 50.0 | Between50And200Function() |
3 | 51.0 | Between50And200Function() |
4 | 199.0 | Between50And200Function() |
5 | 200.0 | Between200And500Function() |
6 | 201.0 | Between200And500Function() |
7 | 499.0 | Between200And500Function() |
8 | 500.0 | Above500Function() |
9 | 501.0 | Above500Function() |
The above test cases satisfy MC/DC in the following manner:-
Get Answers For Free
Most questions answered within 1 hours.