Security Architecture
A developer writes tests that feed a date-parsing function malformed, empty and boundary values and check each return value, with no other component running. Which testing activity is this?
Show the answer
Correct answerB. Unit testing
AWhy not this: Canary testing exposes a new build to a small share of real users in production.
BWhy this is right: Testing one function alone against expected results for varied inputs is the definition of unit testing.
CWhy not this: Regression testing reruns existing tests after a change to catch side effects, not isolated input checks.
DWhy not this: Integration testing checks interactions between components, but here no other component is running.
Unit testing checks the smallest testable piece of code, such as one function, in isolation against expected outputs. Integration testing would involve several components working together, which the stem rules out.