Activity (Hands-On)Grades 9 - 12
Testing Software Programs with JUnit
Materials List
Each group needs:
- computer with internet access
- Java programming environment: install a program like NetBeans (https://netbeans.org/) or other available downloads such as: http://introcs.cs.princeton.edu/java/mac/ (for Mac OS X) or http://textpad.com/ (for Windows)
- JUnit testing tool; all code samples in this activity use version 4 of JUnit, though the code can be adapted to JUnit 3 fairly easily if desired; additional JUnit resources may be found at the websites listed in the Procedure > Before the Activity section
- BowlingGame Java Class (PDF) (students need access to the doc file)
- Test Case Organizational Chart (PDF)
- Testing with JUnit: Performance Assessment (PDF) and Counter Java Class (PDF), one each per student (students need access to the latter doc file as well)
