Skip to main content

Class 12: Testing Your Procedures

Held: Friday, 10 February 2017

We consider testing: When, why, and how you might test the proceduresand programs that you write.

Preliminaries

Overview

  • Why test?
  • Strategies for testing
  • RackUnit’s primary testing operations

Updates

News / Etc.

  • Continue partners! You know the drill.
  • I distributed grades yesterday (although with the wrong class listed).
  • Only HW1 has been graded. A “check” (the default grade) is worth about 85 points. I think that’s stated somewhere in my policies. (If about 1/4 of your grades are “plus”, you usually have a HW score in the A range.)
  • You have all earned five points of extra credit on the exam for corrections. Congratulations! Of course, Titus may never let me write exam problems again. I still appreciate additional corrections, but they will not garner you extra points.
  • I think I’ve responded to every prologue I’ve received (as of 10pm Thursday night). If you filled out the prologue before then, and haven’t heard from me, let me know.
  • Many of you wrote “Stop when I get stuck for more than a few minutes” in response to “What should you do to be successful”. Note that at that point, you should send me an email message explaining what you are stuck on.
  • I was glad to see so many of you (or what seemed to be so many of you) at yesterday’s depressing convocation.

Reminders

  • Ask questions via email! I’m always happy to (try to) answer questions via email. There is no need to apologize when sending me questions. If I take too long to answer, send another email (or even text, if it’s a reasonable hour).
  • Visit me in my office! I’m always happy to see students during my office hours. I prefer that you book me at https://rebelsky.youcanbook.me, but you can also just show up during office hours and hope that I’m not busy.
  • Use our tutors! We have tutors available Sunday through Thursday evening from 7-10 p.m. in Science 3813/15.
  • Visit mentor sessions! We have mentor sessions on Wednesday and Thursday evenings from 8:00-9:00 p.m. in the CS Commons. Wednesdays will be more Q&A, Thursdays will include sample quizzes.
  • Visit review sessions! I run review sessions on Thursdays at 9am in this room.
  • We have individual tutors!
    We have individual tutors available for those who take advantage of the above and find that it’s not enough.
  • Visit our store! We have office supplies in the commons. Price is free will donation.
  • Get news! Feel free to ask me to sign you up for the department mailing list.
  • NEW: Suggest extra credit! Send me extra credit ideas and opportunities.

Upcoming Work

Extra credit (Academic/Artistic)

  • CS Table, Next Tuesday at noon, 14 Feb 2017. Topic forthcoming.
  • Thursday extras, Thursday, 16 Feb 2017, 4:15 p.m., Science 3821: 4-1 joint BA/MSC program with UIowa.

Extra credit (Peer)

  • South-Asian Chai time on Friday, at 4pm, in JRC 2nd floor. Be moderate in all that you do.
  • Reflect on how awesome the sound and lights are for Milo the Rapper and Crunchy Kids 9 p.m., Friday, Gardner.
    Be moderate in all that you do.
  • Pun Club Saturday at 4pm in the Secret Younker 1st Floor Lounge Location. (You only get credit for this once.)
  • Friday-Saturday-Sunday, 17th-19th, Swimming and diving conference championships. (You can only get credit for this twice.)
  • Saturday the 18th, Symphony Concert. 2-4 p.m. Sound painting and more! In Sebring-Lewis.

Good things to do

  • Track meet this Saturday.
  • Large group speech showcase, Saturday at 6:30 p.m., Grinnell High School.
  • Women’s basketball this Saturday at 1pm.
  • Men’s basketball this Saturday at 3pm.

Friday PSA

Most of my thoughts on testing have ended up in the reading.

Basic Idea

  • We verify the correctness of procedures by running tests that compare predicated values to actual values.

Model

  • We do a single comparison with check-equal? (or some variants).
  • We group one or more comparisons into a test case with test-case. That lets us add a description to the checks.
  • We group one or more tests or comparisons into a test suite with test-suite. Unlike test-case, which runs the test,, test-suite builds a value that you run later.