Skip to content
🧪

Testing & Debugging

50 lessons

Learn to test your code — unit tests, integration tests, mocks, TDD, and debugging strategies.

  1. 1

    Testing Overview

    What software testing is, why it matters, and how it keeps your code reliable and maintainable.

  2. 2

    Types of Tests

    Unit, integration, functional, and end-to-end tests explained with when to use each type.

  3. 3

    Unit Testing

    How to write fast, isolated unit tests that pinpoint failures in individual functions.

  4. 4

    Integration Testing

    Verify that modules work correctly together, catching wiring bugs unit tests miss.

  5. 5

    End-to-End Testing

    Drive your whole app like a real user to verify critical journeys work in production.

  6. 6

    Test Frameworks

    Compare Vitest, Jest, Mocha, Playwright, and others to choose the right tool for your project.

  7. 7

    Vitest Basics

    Set up Vitest, write your first test, run the watcher, and read the results.

  8. 8

    Jest Basics

    Get started with Jest: configuration, test blocks, matchers, and the CLI.

  9. 9

    Assertions and Matchers

    Master expect, toBe, toEqual, toThrow, and custom matchers for precise checks.

  10. 10

    Test Doubles

    Understand mocks, stubs, spies, and fakes — the stand-ins that keep tests isolated.

  11. 11

    Mocks

    Create and verify mocks to replace dependencies and assert interactions in your tests.

  12. 12

    Stubs

    Use stubs to feed canned answers to dependencies without asserting interactions.

  13. 13

    Spies

    Observe real function calls without replacing them using vi.spyOn and jest.spyOn.

  14. 14

    Test Fixtures

    Manage reusable test data with fixtures, factories, and JSON snapshot files.

  15. 15

    Test Coverage

    Measure code coverage, set thresholds, and interpret what coverage really tells you.

  16. 16

    Test-Driven Development

    The Red-Green-Refactor cycle: write a failing test, make it pass, then clean up.

  17. 17

    Behavior-Driven Development

    Express tests in plain-language Given-When-Then scenarios with Cucumber and Vitest.

  18. 18

    Testing Asynchronous Code

    Await promises, fake timers, and control time when testing async functions.

  19. 19

    Testing React Components

    Render, query, and assert on components with Testing Library and Vitest.

  20. 20

    Testing React Hooks

    Test custom hooks in isolation with renderHook and act to handle state updates.

  21. 21

    Testing API Endpoints

    Test HTTP handlers and API clients with supertest, MSW, and contract checks.

  22. 22

    Snapshot Testing

    Capture and compare serialized output with snapshots, and know when not to use them.

  23. 23

    Parameterized Tests

    Run the same assertion over many inputs with it.each and describe.each.

  24. 24

    Test Organization

    Structure test files, naming, and folders so the suite stays navigable as it grows.

  25. 25

    Testing in CI

    Run tests automatically on every push with GitHub Actions, caching, and gates.

  26. 26

    Performance Testing

    Benchmark hot paths, detect regressions, and measure load with Vitest bench and k6.

  27. 27

    Accessibility Testing

    Automate a11y checks with axe, test keyboard flow, and verify ARIA semantics.

  28. 28

    Debugging Tests

    Diagnose failing, flaky, and hanging tests with logs, inspectors, and isolation.

  29. 29

    Testing Best Practices

    Principles for trustworthy tests: FAST, single-assertion, behavior-focused, and DRY.

  30. 30

    Testing Strategies

    Combine layers, ratios, and policies into a testing strategy that scales with your team.

  31. 31

    Test Pyramid Strategy

    A comprehensive guide to Test Pyramid Strategy in software testing, covering core concepts, implementation details, and practical examples.

  32. 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. 33

    Integration Testing Patterns

    A comprehensive guide to Integration Testing Patterns in software testing, covering core concepts, implementation details, and practical examples.

  34. 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. 35

    Mocking and Stubbing

    A comprehensive guide to Mocking and Stubbing in software testing, covering core concepts, implementation details, and practical examples.

  36. 36

    Snapshot Testing

    A comprehensive guide to Snapshot Testing in software testing, covering core concepts, implementation details, and practical examples.

  37. 37

    Property-Based Testing

    A comprehensive guide to Property-Based Testing in software testing, covering core concepts, implementation details, and practical examples.

  38. 38

    Mutation Testing

    A comprehensive guide to Mutation Testing in software testing, covering core concepts, implementation details, and practical examples.

  39. 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. 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. 41

    BDD with Cucumber

    A comprehensive guide to BDD with Cucumber in software testing, covering core concepts, implementation details, and practical examples.

  42. 42

    Fixture Management

    A comprehensive guide to Fixture Management in software testing, covering core concepts, implementation details, and practical examples.

  43. 43

    Test Doubles Explained

    A comprehensive guide to Test Doubles Explained in software testing, covering core concepts, implementation details, and practical examples.

  44. 44

    Testing Async Code

    A comprehensive guide to Testing Async Code in software testing, covering core concepts, implementation details, and practical examples.

  45. 45

    Performance Testing

    A comprehensive guide to Performance Testing in software testing, covering core concepts, implementation details, and practical examples.

  46. 46

    Load Testing Strategies

    A comprehensive guide to Load Testing Strategies in software testing, covering core concepts, implementation details, and practical examples.

  47. 47

    Fuzz Testing

    A comprehensive guide to Fuzz Testing in software testing, covering core concepts, implementation details, and practical examples.

  48. 48

    Visual Regression Testing

    A comprehensive guide to Visual Regression Testing in software testing, covering core concepts, implementation details, and practical examples.

  49. 49

    Accessibility Testing

    A comprehensive guide to Accessibility Testing in software testing, covering core concepts, implementation details, and practical examples.

  50. 50

    Contract Testing

    A comprehensive guide to Contract Testing in software testing, covering core concepts, implementation details, and practical examples.

Completed: 0 / 500%

Learning Stages

Est. total: 14h 25m
  1. 1

    Foundation

    13 lessons · 2h 10m

    Build a solid foundation with the essential concepts and syntax.

    0/13
  2. Core

    13 lessons · 3h 15m

    Deepen your understanding with core patterns and common use cases.

    0/13
  3. Intermediate

    12 lessons · 4h

    Tackle intermediate topics and start combining concepts fluently.

    0/12
  4. Advanced

    12 lessons · 5h

    Master 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.

Overall0%
  • Lessons0 / 200%
  • Exercises0 / 1000%
  • Projects0 / 100%

Skill Assessment

0 / 20 mastered
0 mastered0 in progress20 not started
  • Unit TestingFoundation
    0 / 4 lessons · 0%
  • Integration TestingCore
    0 / 3 lessons · 0%
  • End-to-End TestingIntermediate
    0 / 2 lessons · 0%
  • Mocking & Test DoublesCore
    0 / 4 lessons · 0%
  • Test-Driven DevelopmentIntermediate
    0 / 3 lessons · 0%
  • Test CoverageCore
    0 / 2 lessons · 0%
  • Test FrameworksCore
    0 / 3 lessons · 0%
  • Advanced TestingAdvanced
    0 / 4 lessons · 0%

+12 more skills

Recommended next: testing-overview
20 remaining

Build real projects

Apply what you learned by building guided projects with starter code and solutions.

View projects

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors