Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
25.17. Summary
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is unit testing?
Hint
Think about testing a small piece of code.
- 2.
What does JUnit help with?
Hint
It's a testing framework.
- 3.
What does JUnit facilitate?
- A framework for debugging
- A framework for unit testing
- A design optimization tool
Hint
Think about its main purpose.
- 4.
True or False: Unit testing is performed by testers in the quality assurance team.
- True
- False
Hint
Consider who writes and runs the unit tests.
- 5.
Create a unit test using JUnit for a simple function that adds two numbers and returns the result. Ensure to handle edge cases.
Hint
Start by creating a function that performs the addition.
- 6.
You have an application that throws an unexpected error. Describe how you would approach debugging the error systematically.
Hint
Think of the steps you would take in a detective investigation.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting