Testing & Debugging
50 lessons
Learn to test your code — unit tests, integration tests, mocks, TDD, and debugging strategies.
-
1 Testing Overview
What software testing is, why it matters, and how it keeps your code reliable and maintainable.
-
2 Types of Tests
Unit, integration, functional, and end-to-end tests explained with when to use each type.
-
3 Unit Testing
How to write fast, isolated unit tests that pinpoint failures in individual functions.
-
4 Integration Testing
Verify that modules work correctly together, catching wiring bugs unit tests miss.
-
5 End-to-End Testing
Drive your whole app like a real user to verify critical journeys work in production.
-
6 Test Frameworks
Compare Vitest, Jest, Mocha, Playwright, and others to choose the right tool for your project.
-
7 Vitest Basics
Set up Vitest, write your first test, run the watcher, and read the results.
-
8 Jest Basics
Get started with Jest: configuration, test blocks, matchers, and the CLI.
-
9 Assertions and Matchers
Master expect, toBe, toEqual, toThrow, and custom matchers for precise checks.
-
10 Test Doubles
Understand mocks, stubs, spies, and fakes — the stand-ins that keep tests isolated.
-
11 Mocks
Create and verify mocks to replace dependencies and assert interactions in your tests.
-
12 Stubs
Use stubs to feed canned answers to dependencies without asserting interactions.
-
13 Spies
Observe real function calls without replacing them using vi.spyOn and jest.spyOn.
-
14 Test Fixtures
Manage reusable test data with fixtures, factories, and JSON snapshot files.
-
15 Test Coverage
Measure code coverage, set thresholds, and interpret what coverage really tells you.
-
16 Test-Driven Development
The Red-Green-Refactor cycle: write a failing test, make it pass, then clean up.
-
17 Behavior-Driven Development
Express tests in plain-language Given-When-Then scenarios with Cucumber and Vitest.
-
18 Testing Asynchronous Code
Await promises, fake timers, and control time when testing async functions.
-
19 Testing React Components
Render, query, and assert on components with Testing Library and Vitest.
-
20 Testing React Hooks
Test custom hooks in isolation with renderHook and act to handle state updates.
-
21 Testing API Endpoints
Test HTTP handlers and API clients with supertest, MSW, and contract checks.
-
22 Snapshot Testing
Capture and compare serialized output with snapshots, and know when not to use them.
-
23 Parameterized Tests
Run the same assertion over many inputs with it.each and describe.each.
-
24 Test Organization
Structure test files, naming, and folders so the suite stays navigable as it grows.
-
25 Testing in CI
Run tests automatically on every push with GitHub Actions, caching, and gates.
-
26 Performance Testing
Benchmark hot paths, detect regressions, and measure load with Vitest bench and k6.
-
27 Accessibility Testing
Automate a11y checks with axe, test keyboard flow, and verify ARIA semantics.
-
28 Debugging Tests
Diagnose failing, flaky, and hanging tests with logs, inspectors, and isolation.
-
29 Testing Best Practices
Principles for trustworthy tests: FAST, single-assertion, behavior-focused, and DRY.
-
30 Testing Strategies
Combine layers, ratios, and policies into a testing strategy that scales with your team.
-
31 Test Pyramid Strategy
A comprehensive guide to Test Pyramid Strategy in software testing, covering core concepts, implementation details, and practical examples.
-
32 Unit Testing Best Practices
A comprehensive guide to Unit Testing Best Practices in software testing, covering core concepts, implementation details, and practical examples.
-
33 Integration Testing Patterns
A comprehensive guide to Integration Testing Patterns in software testing, covering core concepts, implementation details, and practical examples.
-
34 End-to-End Testing
A comprehensive guide to End-to-End Testing in software testing, covering core concepts, implementation details, and practical examples.
-
35 Mocking and Stubbing
A comprehensive guide to Mocking and Stubbing in software testing, covering core concepts, implementation details, and practical examples.
-
36 Snapshot Testing
A comprehensive guide to Snapshot Testing in software testing, covering core concepts, implementation details, and practical examples.
-
37 Property-Based Testing
A comprehensive guide to Property-Based Testing in software testing, covering core concepts, implementation details, and practical examples.
-
38 Mutation Testing
A comprehensive guide to Mutation Testing in software testing, covering core concepts, implementation details, and practical examples.
-
39 Coverage Metrics and Goals
A comprehensive guide to Coverage Metrics and Goals in software testing, covering core concepts, implementation details, and practical examples.
-
40 TDD Red Green Refactor
A comprehensive guide to TDD Red Green Refactor in software testing, covering core concepts, implementation details, and practical examples.
-
41 BDD with Cucumber
A comprehensive guide to BDD with Cucumber in software testing, covering core concepts, implementation details, and practical examples.
-
42 Fixture Management
A comprehensive guide to Fixture Management in software testing, covering core concepts, implementation details, and practical examples.
-
43 Test Doubles Explained
A comprehensive guide to Test Doubles Explained in software testing, covering core concepts, implementation details, and practical examples.
-
44 Testing Async Code
A comprehensive guide to Testing Async Code in software testing, covering core concepts, implementation details, and practical examples.
-
45 Performance Testing
A comprehensive guide to Performance Testing in software testing, covering core concepts, implementation details, and practical examples.
-
46 Load Testing Strategies
A comprehensive guide to Load Testing Strategies in software testing, covering core concepts, implementation details, and practical examples.
-
47 Fuzz Testing
A comprehensive guide to Fuzz Testing in software testing, covering core concepts, implementation details, and practical examples.
-
48 Visual Regression Testing
A comprehensive guide to Visual Regression Testing in software testing, covering core concepts, implementation details, and practical examples.
-
49 Accessibility Testing
A comprehensive guide to Accessibility Testing in software testing, covering core concepts, implementation details, and practical examples.
-
50 Contract Testing
A comprehensive guide to Contract Testing in software testing, covering core concepts, implementation details, and practical examples.
Learning Stages
Est. total: 14h 25m- 1
Foundation
13 lessons · 2h 10mBuild a solid foundation with the essential concepts and syntax.
0/13 Core
13 lessons · 3h 15mDeepen your understanding with core patterns and common use cases.
0/13Intermediate
12 lessons · 4hTackle intermediate topics and start combining concepts fluently.
0/12Advanced
12 lessons · 5hMaster advanced techniques and apply them to real-world problems.
0/12
Completion Standard
Complete 80% lessons, 60% exercises, and 50% projects to master this topic.
- Lessons0 / 200%
- Exercises0 / 1000%
- Projects0 / 100%
Skill Assessment
0 / 20 mastered- Unit TestingFoundation0 / 4 lessons · 0%
- Integration TestingCore0 / 3 lessons · 0%
- End-to-End TestingIntermediate0 / 2 lessons · 0%
- Mocking & Test DoublesCore0 / 4 lessons · 0%
- Test-Driven DevelopmentIntermediate0 / 3 lessons · 0%
- Test CoverageCore0 / 2 lessons · 0%
- Test FrameworksCore0 / 3 lessons · 0%
- Advanced TestingAdvanced0 / 4 lessons · 0%
+12 more skills
Build real projects
Apply what you learned by building guided projects with starter code and solutions.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.