volume_mute

Guideline-Based Testing for Sequences

publish date2026/06/19 10:51:13.876359 UTC

volume_mute

Which three guidelines are recommended for testing programs that process sequences or arrays?

Correct Answer

(1) Test with sequences that have only a single value
(2) Use different sequences of different sizes in different tests
(3) Derive tests so that the first, middle, and last elements of the sequence are accessed

Explanation

The three sequence testing guidelines are: (1) test with a single-value sequence - programmers often assume sequences have multiple values; (2) use different sizes - reduces accidental correct outputs from defective code; (3) access first, middle, and last elements - reveals problems at boundaries of array processing.

Reference

Software Engineering, Ian Sommerville, 10th edition


Quizzes you can take where this question appears