Testing basics: unit, integration and what to test
For developers, automation engineers and technically minded support staff who write or review code that other people rely on. You should already be able to read short Python or JavaScript functions and run commands in a terminal; no testing experience is assumed. You'll learn what separates unit, integration and end-to-end tests, write small tests in pytest, unittest and Jest, decide which behaviour deserves a test, keep tests isolated with fixtures and test doubles, and review someone else's tests critically. Your team's own conventions and CI rules take precedence over the examples here.
- Level
- Intermediate
- Length
- About 92 minutes
- Contents
- 5 lessons · final exam
- Status
- Published · updated 10 Oct 2026
Skills you'll practise
- Distinguish unit, integration and end-to-end tests by what they exercise and what they depend on
- Write a unit test that sets up inputs, calls the code and checks the result, including expected errors and parametrized cases
- Choose what to test: behaviour through the public interface, boundaries and error paths
- Use fixtures and test doubles to keep tests isolated and repeatable
- Review a test and judge whether it would fail if the code were broken
Course outline
- 1.Distinguishing unit, integration and end-to-end testsLesson · 16 min
- 2.Writing a unit test: set up, call, checkLesson · 20 min
- 3.Choosing what to testLesson · 18 min
- 4.Using fixtures and test doubles to keep tests isolatedLesson · 18 min
- 5.Reviewing a test: would it fail if the code were broken?Lesson · 12 min
- 6.Testing basics: unit, integration and what to test: knowledge checkKnowledge check · 14 questions
- 7.Testing basics: unit, integration and what to test: practical exerciseKnowledge check · 1 question
- 8.Final exam10 questions · passing it completes the course, so people who already know the material can test out
Sources it draws on
The lessons and questions are written from these references, so learners can go back to the original.
- pytest documentation: Get Started (pytest 9.1)
- pytest documentation: How to parametrize fixtures and test functions
- pytest documentation: How to use fixtures
- Python documentation: unittest, Unit testing framework (Python 3.14)
- Jest documentation: Getting Started (Jest 30.5)
- Jest documentation: Mock Functions (Jest 30.5)
- Ham Vocke on martinfowler.com: The Practical Test Pyramid (26 February 2018)
- Martin Fowler: TestDouble (bliki, 17 January 2006)
- Google Testing Blog: Test Sizes (Simon Stewart, 13 December 2010)
- Google Testing Blog: Testing on the Toilet: Test Behavior, Not Implementation (Andrew Trenk, 5 August 2013)
- Google Engineering Practices: What to look for in a code review (Tests)
See it with your own jobs and topics
Tell us about your team and we'll walk you through setup, from choosing jobs to your first skills check.