Software Testing and Automation

Terminal showing seventeen JUnit tests passing

Durham College INFT 1207 ยท open material

Break the code on purpose, and let a test catch it

Students learn testing with programs small enough to understand in minutes: a console calculator and the delivery rules of the SkyDrop simulator. They run the tests, break the code on purpose, make the common beginner mistakes, and then automate everything in a CI pipeline that runs on every push.

Python unittestJUnit 4 and 5Code coverageGitHub Actions

Material

RepositoryWhat students doNeeds
unit-testing-demoThe same calculator in Python and Java. Run it, run the tests, let a test find a bug, remove a safety check and see an error, and learn the most useful assert methods. Every step has macOS and Windows commands with screenshots.Python 3, JDK
skydrop-testing-ciFive SkyDrop delivery rules (weight, size, fee, time, battery) tested with JUnit 5, measured with coverage, reviewed in pull requests, and checked by GitHub Actions. Coverage is published to GitHub Pages when main passes.JDK 17, VS Code, Git
LabCode-INFT-1207Course lab code with a starter CI workflow.Python 3
SeleniumBrowser automation for web application testing.Python, Selenium

Topics

Designing tests

  • Unit, integration and system testing
  • Equivalence classes and boundary values
  • Test-first development
  • Reading test failures and errors

Automating them

  • Coverage and what it does not tell you
  • Git, pull requests and code review
  • CI/CD with GitHub Actions
  • Web UI automation with Selenium