1.1.3 Hands-on: Fix the bug
Course subject(s)
Module 1. Automated Software Testing
Let’s fix the bug in the NumFinder program. After all, we don’t like bugs!
- Open the NumFinder class that is inside the tudelft.numfinder package in the mooc examples project.
- Open the NumFinderMain class, also in the same package.
- Run the main file. You can do that by clicking on the green arrow near the public static void main line.
- You should see the buggy output!
- Now, go back to the NumFinder class and fix the bug!
- Go back to the main class and run it again to make sure the output is now correct.
- Try different inputs and outputs and see if you can find more bugs. Try corner cases. For example, what happens if we pass a nullĀ to this method?
Automated Software Testing: Practical Skills for Java Developers by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/automated-software-testing-practical-skills-for-java-developers/.