Lesson 2 · An Introduction to API Testing

API Test Types

Not all API tests serve the same purpose. Different test types address different concerns — from correctness and contracts to performance under load. Knowing which tests to reach for (and when) is a foundational skill.

What You’ll Learn
1

Identify the key concerns that API testing addresses, from error handling to edge cases.

2

Distinguish between contract, unit, end-to-end, and load testing and explain when each applies.

3

Match each test type to its correct definition and real-world use case.

Key Concerns in API Testing

When you test an API, you’re checking that it behaves correctly across a range of conditions. Each of the following concerns represents a dimension of quality. Step through the carousel to understand what each concern means and why it matters.

Match the Test Type

Now that you understand what API tests look for, let’s explore the four core test types you’ll encounter. Drag each test type to its matching definition.

Drag these cards →
📜 Contract Testing
🔬 Unit Testing
🔗 End-to-End Testing
📈 Load Testing
← Drop onto the right definition
 
Establishes a single source of truth for what each request and response should look like
 
Confirms that a single endpoint returns the correct response to a given request
 
Validates key user journeys that may involve multiple endpoints and APIs
 
Checks whether an API is able to operate reliably during times of peak traffic
💡
Key Takeaway

Most teams start with unit tests (fast, focused, high confidence) and layer on contract, end-to-end, and load tests as their API matures. You don’t need every test type on day one — but you should know what each one offers so you can reach for the right tool at the right time.

Up Next
Lesson 3: Test Automation at a Glance
Why automation matters and how it fits into API-first development