Free module
Software testing
Learn software testing hands on: unit tests, test cases, fakes, test-driven development and code coverage, with Python in a lab.
The lessons
Each lesson is free to read in full. Create a free account to run its commands in a live lab and to sit its quizzes and tasks.
1 · Virtual machine lab
Software testing basics: faults and test levels
I can say which kind of test finds which kind of fault.
Read the lesson2 · Virtual machine lab
How to write a unit test
I can write a unit test with assertions and run it with python3 -m unittest.
Read the lesson3 · Virtual machine lab
Equivalence classes and boundary value testing
I can pick test cases from equivalence classes and boundaries.
Read the lesson4 · Virtual machine lab
Test doubles: fakes, stubs and mocks
I can test code that depends on the time or on chance by replacing it with a fixed fake.
Read the lesson5 · Virtual machine lab
Test-driven development: red, green, refactor
I can write a failing test first, make it pass and tidy up.
Read the lesson6 · Virtual machine lab
Code coverage: what it shows and misses
I can read a coverage figure and say what it misses.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.