volume_mute

Three Parts of an Automated Test

publish date2026/06/17 05:25:31.214995 UTC

volume_mute
True
Please drag and drop the options to sort them

An automated unit test has three standard parts. Arrange them in the correct order.

Assertion part - compare the result of the call with the expected result
Setup part - initialize the system with the test case inputs and expected outputs
Call part - call the object or method to be tested

Correct Answer

(1) Setup part - initialize the system with the test case inputs and expected outputs
(2) Call part - call the object or method to be tested
(3) Assertion part - compare the result of the call with the expected result

Explanation

Automated tests have three parts in sequence: (1) Setup - initialize the system with the test case (inputs and expected outputs); (2) Call - invoke the object or method being tested; (3) Assertion - compare the actual result with the expected result. If the assertion evaluates to true, the test passed; if false, it failed.

Reference

Software Engineering, Ian Sommerville, 10th edition


Quizzes you can take where this question appears