volume_mute
Parts of an Automated Unit Test
publish date: 2026/06/19 10:51:10.116805 UTC
volume_muteAn automated unit test has three standard parts. Match each part to its description.
To complete the line match
- Click on an item in the first group
- Click on the match in the second group
To delete a match, double click on a line
Part
Call
Setup
Assertion
Description
Initialize the system with the test case inputs and expected outputs
Invoke the object or method being tested
Compare the actual result with the expected result; true means pass, false means fail
Correct Answer
(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; true means pass, false means fail
Explanation
Every automated unit test follows three parts: (1) Setup - initialize the system with inputs and expected outputs; (2) Call - invoke the unit being tested; (3) Assertion - compare the actual result to the expected result. If the assertion is true, the test passes; if false, the test fails.
Reference
Software Engineering, Ian Sommerville, 10th edition
