CERTIFIED-DATA-ENGINEER-PROFESSIONAL · Question #94
A data engineer is testing a collection of mathematical functions, one of which calculates the area under a curve as described by another function. Which kind of the test does the above line…
The correct answer is B. Unit. A unit test validates a single, isolated function or 'unit' of code with known inputs and expected outputs. Testing one mathematical function-such as one that calculates the area under a curve-in isolation is the definition of a unit test. Integration tests verify that multiple…
Question
A data engineer is testing a collection of mathematical functions, one of which calculates the area under a curve as described by another function. Which kind of the test does the above line exemplify?
Options
- AIntegration
- BUnit
- CManual
- Dfunctional
- EEnd-to-end
How the community answered
(30 responses)- A7% (2)
- B90% (27)
- D3% (1)
Explanation
A unit test validates a single, isolated function or 'unit' of code with known inputs and expected outputs. Testing one mathematical function-such as one that calculates the area under a curve-in isolation is the definition of a unit test. Integration tests verify that multiple components work correctly together. End-to-end tests simulate full user workflows across the entire system. Functional tests verify behavior against business requirements at a higher level. Since the question describes testing a single function independently, the correct classification is a unit test.
Topics
Community Discussion
No community discussion yet for this question.