CS253: Software Development with C++

Spring 2021

Testing

Show Lecture.Testing as a slide show.

CS253 Testing

Philosophy of testing

  1. Get over it
  2. Trust, but verify
  3. Test the typical cases
  4. Test the limits
  5. Automation

Get over it

Trust, but verify

Doubting Thomas (I call him “Testing Thomas”)

Sure, whoever programmed this is really smart (especially if they’re you). It’s probably correct.

Test the typical cases

Test the limits

Automation

    #! /bin/bash
    (
        ./hw2 <alpha
        ./hw2 alpha
        ./hw2 alpha beta
        …
    ) >&out
    diff out known-good-output