
CSIS 110 - Lecture 33
Announcements:
Read: Chapter 6, sec 6.1 to 6.3.
Quiz Results:
Possible 25
Mean 18.3
Median 20.25
Max 24
Distribution: <15: 2 15-17: 4 17.5-19.5: 0 20-22: 5 22.5-24.5: 3
Testing
Last time we started looking at testing.
- application testing: testing a completed application, often only through its user
interface.
oWe saw that even testing a simple application takes a lot of effort
oConcepts: boundary conditions, positive and negative test cases
oDiscuss next assignment - What do you think is the point of this
assignment?
- Unit testing: testing parts of an application as you write it.
Unit Testing
What's unit testing?
Testing parts of an application while you are building it:
- it's never too early to start testing
- Allows you to find problems earlier, when they are easier to fix
- You build a set of tests, which you can reuse when you modify the code
So, let's try some unit testing. Open up the diary-prototype project from the chapter 6
folder.
This is an early version of an appointment book. The final goal is to build an application
that allows users to schedule appointments up to 1 year in advance.
In this version, there are 3 classes:
- Appointment: objects that keep track of an appointment's purpose and duration
- Day: A Day object keeps track of a set of Appointments that have been made on a
single day. Each day has a unique position in the year โ a value from 1 to 366.
Appoints can only be made from 9AM to 5PM (using a 24 hour clock).