Databricks Certified Data Engineer Professional · Free Practice Question Easy

Question 12

Which of the following statements correctly describes Unit Testing ?

  • A

    It’s an approach to simulate a user experience to ensure that the application can run properly under real-world scenarios

  • B

    It’s an approach to test the interaction between subsystems of an application to ensure that modules work properly as a group.

  • C

    It’s an approach to test individual units of code to determine whether they still work as expected if new changes are made to them in the future

  • D

    It’s an approach to verify if each feature of the application works as per the business requirements

  • E

    It’s an approach to measure the reliability, speed, scalability, and responsiveness of an application

Reveal correct answer

Correct answer: C

Explanation

Unit testing is an approach to testing units of code, such as functions. So, If you make any changes to them in the future, you can use unit tests to determine whether they still work as you expect them to.


Assertions are used in unit tests to check if certain assumptions remain true while you're developing your code.


assert func() == expected_value



Reference:

https://docs.databricks.com/notebooks/testing.html


Study materials from our exam preparation course on Udemy:

Lecture


Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need