1
Java & Testing
Slides adapted from Craig Zilles
Java & Testing Slides adapted from Craig Zilles 1 Things to - - PowerPoint PPT Presentation
Java & Testing Slides adapted from Craig Zilles 1 Things to have been doing join UIUC CS 126 on piazza.com get an iClicker registered at http://iclicker.com get a GitHub account install IntelliJ on to your laptop (students can get
1
Slides adapted from Craig Zilles
2
¢ join UIUC CS 126 on piazza.com ¢ get an iClicker registered at http://iclicker.com ¢ get a GitHub account ¢ install IntelliJ on to your laptop (students can get the
¢ clone an Introduction repo and edit it to put in your netid:
¢ review course policies:
¢ Code review survey
3
¢ Improve quality - find faults ¢ Measure quality
¢ Learn the software
4
¢ Testing is detecting errors ¢ Debugging is a means of diagnosing and correcting the
5
¢ Unit Testing ¢ Component Testing ¢ Integration Testing ¢ Regression Testing ¢ System Testing
6
¢ Unit Testing
¢ Component Testing ¢ Integration Testing ¢ Regression Testing ¢ System Testing
7
¢ Black box testing: ¢ White box testing:
8
¢ Black box testing: a.k.a. Behavioral Testing
¢ White box testing: a.k.a. Structural Testing
9
¢ Manual
¢ Automatic
10
¢ Open source Java testing framework for automated testing ¢ Widely used in industry ¢ Features:
¢ Primarily for unit and integration testing, not system testing
11
¢ Which kind of testing is “specification testing”
12
¢ A program needs to be developed so that given an integer
¢ What would be your black box tests? (How many do you need?)
13
¢ Equivalence Partitioning: If two test cases flush out exactly
¢ Error Guessing: guesses about where the program might
¢ Boundary Analysis: write test cases that exercise the
¢ Classes of Good Data: Nominal cases (middle-of-the-road,
¢ Classes of Bad Data: Too little data (or no data), too much
14
15
¢ Detect defects earlier (cheaper) ¢ Forces understanding of the requirements before you
¢ Identifies problems with the requirements earlier ¢ No more effort to test first ¢ A tenet of eXtreme Programming (XP)