When I began writing more deliberate test plans for my apps, I found that test names were less useful than test questions. “We have integration tests” says little without knowing which boundary they exercise. “The regression suite passed” says little without knowing which behaviors it revisits.
These names describe different aspects of testing. Functional describes the behavior being checked; integration describes an interaction boundary; smoke describes a limited readiness check; regression describes testing after change. They can overlap. I find the names most useful when they explain what a test checks and what its failure tells us. The ISTQB Foundation Level syllabus distinguishes test levels, test types, and testing after change.
Functional: does the behavior match the requirement?
A functional test checks an expected capability at a unit, API, component, or end-to-end level. Its dependencies and interface follow from the behavior being checked.
Consider a cart requirement: adding two items should produce the correct total. An isolated model test can check calculation quickly. An API test can check the returned total. A UI test can check what the user sees. Those tests ask related questions at different boundaries.
This illustrative XCTest example focuses on behavior without a network dependency:
func testAddingTwoItemsUpdatesTotal() {
var cart = Cart()
cart.add(price: Decimal(string: "3.50")!, quantity: 2)
XCTAssertEqual(cart.total, Decimal(7))
}
This focused example checks quantity multiplication. Tax, rounding policy, and currency rules would each need additional cases.
Integration: do the components agree?
An integration test exercises interaction across a meaningful boundary: service and database, client and API, or publisher and consumer. The setup should state which components are real and which surrounding dependencies are substituted.
A contract test can verify an agreed request and response shape without exercising the entire deployed system. Pact’s documentation explains how consumer tests and provider verification check different sides of that agreement. The deployed connection may still fail because of permissions, configuration, or runtime behavior outside the contract.
For a mobile API, I would inspect field names, optional values, serialization, authorization errors, and pagination. A fake that always returns the same ideal object can hide the very mismatch an integration test is meant to find.
Test data also needs isolation. A convenient shared environment can introduce changing state and unclear ownership. Disposable databases or uniquely scoped fixtures are useful where the system supports them.
Smoke: is the candidate usable enough to continue?
A smoke suite is a deliberately small set of high-value checks. It may include launch, sign-in, and one critical transaction. It can exercise business logic; its defining feature is narrow scope and fast evidence about basic viability.
The suite should remain small enough to run at an important decision point, such as after deployment. Including the principal user workflow gives more useful readiness evidence than a health endpoint alone.
Failure should have a defined response. That may block promotion or trigger investigation. The team should define when failure blocks promotion, triggers investigation, or warrants rollback.
Regression: did a change break behavior we rely on?
Regression testing revisits existing behavior after change. Tests for historical defects are particularly useful examples, but the category is broader than bug history.
When fixing a defect, I first want to reproduce the original failure and confirm that the fix resolves it. That is confirmation testing. Regression testing asks the wider question: what else might the change have affected? A test for the original defect can remain in future regression coverage, with a linked issue explaining why it exists.
Put cost and evidence together
| Question | Useful evidence | Common blind spot |
|---|---|---|
| Does the rule work? | Focused functional assertion | Unrealistic fixture |
| Do components agree? | Boundary exercised with stated dependencies | Environment drift |
| Is this build viable? | Short critical-path smoke flow | Suite expands until rarely run |
| Did behavior change unexpectedly? | Repeatable regression coverage | Missing original conditions |
Runtime, reliability, and diagnostic value belong in the same discussion. A quick assertion on an unrealistic fixture can miss the problem. A slower boundary test may be worth keeping if it catches a costly failure and tells us where to investigate. I would measure those properties before setting a suite budget.
The part I enjoy is turning an uncertain behavior into a precise question. A good suite makes those questions repeatable and makes the next failure easier to investigate.