Types of Testing

Explore the different types of software testing, understand the testing pyramid, and learn when to apply functional, non-functional, and specialized testing techniques.

Foundation Module 1 Lesson 3
10 min read

What you'll learn

  • Distinguish between functional and non-functional testing
  • Explain the testing pyramid and the role of each level
  • Identify when to apply different types of testing

Types of Testing

A unit test serves a completely different purpose than an end-to-end test. Knowing the landscape is essential for building a real testing strategy.

Functional vs. Non-Functional

Functional Testing

Does it work?

Does login work?
Can I add to cart?
Does search return results?

Non-functional Testing

How well does it work?

Is it fast enough?
Is it secure?
Is it accessible?

Functional Testing

  • Answers: 'Does it work?'
  • Checks registration creates an account
  • Verifies discount codes apply correctly
  • Confirms password reset emails send
  • Focus: features and correctness

Non-Functional Testing

  • Answers: 'Does it work well enough?'
  • Performance under load
  • Security against injection and XSS
  • Accessibility and usability
  • Focus: speed, safety, reliability

VerdictA system can be functionally correct but non-functionally broken — like a search that returns perfect results in 45 seconds. Cover both.

Quick check

Question 1 of 10 correct

A checkout page processes payments correctly but fails for 2 out of every 10 users under heavy traffic. What kind of testing would catch this?

The Testing Pyramid

E2E TestsFew
Integration TestsSome
Unit TestsMany
  • E2E Tests:Full user workflows, slow, fragile
  • Integration Tests:Components working together
  • Unit Tests:Individual functions, fast, reliable
The testing pyramid: lots of fast unit tests at the base, fewer slow E2E tests at the top.
  1. 1

    End-to-End Tests (top — few)

    Test the whole app through a real browser. Slow, expensive, realistic. Reserve for critical user journeys.

  2. 2

    Integration Tests (middle — some)

    Test how components work together. Catches bugs that unit tests can't see — data-format mismatches, contract drift.

  3. 3

    Unit Tests (base — many)

    Test individual functions in isolation. Fast, cheap, precise. The bulk of your test suite.

E2E TestsMany
IntegrationSome
Unit TestsFew
  • E2E Tests:Way too many! Slow CI, flaky tests
  • Integration:Some
  • Unit Tests:Not enough!
Ice cream cone ANTI-PATTERN: too many slow E2E tests, not enough fast unit tests.

Exercise: Build the Testing Pyramid

Drag the testing levels into pyramid order, from BOTTOM (most tests, fastest) to TOP (fewest tests, slowest):

  1. 1End-to-End Tests
  2. 2Unit Tests
  3. 3Integration Tests

Other Important Testing Types

TypePurposeWhen to Use
Smoke TestingQuick check that critical functions work after a build or deploymentAfter every deployment
Regression TestingVerify that new changes haven’t broken existing functionalityBefore every release
Exploratory TestingUnscripted, creative testing guided by tester’s experience and intuitionWhen scripted tests aren’t enough
Acceptance TestingVerify the software meets business requirements and is ready for deliveryBefore release, with stakeholders

Exercise: Match Testing Types

Match each testing type with its correct description:

Choosing Your Strategy


Check Your Understanding

Question 1 of 30 correct

A search feature returns the correct results but takes 30 seconds to load. Which type of testing would catch this issue?