nerdexam
Databricks

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…

Software Development Practices

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)
  • A
    7% (2)
  • B
    90% (27)
  • D
    3% (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

#Software Testing#Unit Testing#Data Engineering Best Practices#Code Quality

Community Discussion

No community discussion yet for this question.

Full CERTIFIED-DATA-ENGINEER-PROFESSIONAL Practice