Types of software testing: Levels, examples and when to use each
Contents
Software testing has no single list of types, because the usual names sit on four different axes: execution method, technique, level and purpose. Once you know which axis a name belongs to, the choice is simple: decide what to verify, at which level, with which technique and how to run it.
How many types of software testing are there?
Software testing has four test levels and no fixed count of types, because types sort checks along separate axes: level, objective, technique, and execution mode. A flat list of types hides the gap where heavily mocked unit testing passes while the real integration breaks.

We recommend choosing the level first and adding the other axes as risks appear, because the level decides where a defect is cheapest to catch. Netguru builds web and mobile products and works on test automation, QA processes and release pipelines for enterprise clients. The right mix depends on how API-heavy the product is and how costly a missed defect would be.
The four axes, with example types from a meal-ordering app with web checkout:
| Axis | Question it answers | Example types |
|---|---|---|
| Level | Where in the system does the check run? | Unit, integration, system, user acceptance |
| Objective | Is the oracle a specified behavior or a quality threshold? | Regression, smoke (functional); performance, security, accessibility (non-functional testing) |
| Technique | What can the tester see of the code? | Black box, white box, gray box |
| Execution | Who or what runs the check? | Manual exploratory, automated regression suite |
What are the four types of software testing?
The four types of software testing are four test levels: unit, integration, system, and user acceptance testing, each defined by how much of the product it exercises and who judges the result.
Take a meal-ordering mobile app with a web checkout, the kind of product a quality assurance plan has to cover end to end.
Assume a customer adds two dishes at $12.50 and $9.00, applies a 10% promo code, pays by card, and the restaurant receives the order (illustrative figures). One flow crosses all four levels, and what changes at each level is how much of it is real.
The levels side by side:
| Level | What runs | Real vs doubled | Where it ends |
|---|---|---|---|
| Unit | The order-total function | Promo lookup is a test double; no database or network | At the first call outside the process |
| Integration | Order service with its neighbors | Real database; payment provider sandbox or contract-verified stub | At the service boundary, before any screen |
| System | The deployed build in staging | Whole product real; third parties on sandboxes | At the product's outer edge |
| Acceptance | The same flow, run by business users | Staging build, real operators | At the accept or reject decision |
Unit testing starts with the function that computes the order total. For two items, a 10% promo code, and a $3.00 delivery fee (illustrative), the oracle is $22.35: $21.50 less 10% is $19.35, plus $3.00. The test runs in memory against a double for the promo lookup, so it finishes in milliseconds.
Integration testing checks the order service against its neighbors: a real database, the menu service, and the payment provider's sandbox or a stub verified against its contract. A declined card must leave the order in a payment_failed state. The charge amount must also reach the provider in the unit it expects, for example minor units (2235, not 22.35).
System testing drives the deployed build in staging. A tester browses the menu in the mobile app, moves to the web checkout, pays with a sandbox card, and confirms that the restaurant dashboard shows the order and the customer receives a confirmation email. The oracle is the written requirements for the whole product, and the test stops where third-party sandboxes begin.
User acceptance testing hands the same flow to the product owner and a restaurant operator. They run it against written acceptance criteria, such as "the kitchen display shows the order with allergen notes intact". The verdict is accept or reject for business use, which a defect count cannot give.
One defect shows why the levels stay separate. If the 10% discount is wrongly applied to the delivery fee too, a unit test catches it in milliseconds.
If it slips through, it surfaces as a wrong charge at integration, a mismatched confirmation at system level, or a rejected order at acceptance, and the diagnosis usually gets more expensive at each step.
Unit and integration testing: Where mocks hide breakage
Heavily mocked unit tests can pass while the real payment or menu API integration breaks, because a test double only repeats what its author assumed the dependency returns.
Unit testing checks a single function or class in isolation with test doubles, while integration testing checks that two or more components work together across their real interface.
The two levels side by side, using the meal-ordering app:
| Unit testing | Integration testing | |
|---|---|---|
| Example | The cart-total function sums dish prices and applies a promo code | The checkout service calls the payment provider's sandbox and handles a declined card |
| Use when | Code has branches, calculations or edge cases | A boundary exists: database, queue or third-party API |
| Automate? | Yes, on every commit | Yes, on every pull request, against containers or a stable sandbox |
Here is how the mock hides the break. A unit test stubs the menu client to return price: 12.5. Later the menu API renames the field to priceCents. The stub still returns the old shape, the unit suite stays green, and checkout fails in staging. The test verified your code against your memory of the API.
A consumer-driven contract test closes that gap. The consumer records the requests it sends and the responses it expects, and the provider's pipeline replays that contract against the real service. Pact is a common implementation. A renamed field then fails the provider's build before release, and stubs generated from the contract cannot drift from the real API.
Contract tests check shape and status, not business behavior such as whether a payment settles. Keep a small set of real integration tests against the provider sandbox for that. When the provider is a third party that will not run your contract, scheduled sandbox tests are the fallback (see API testing tools).
System testing and UAT: Acceptance criteria decide the verdict
System testing and user acceptance testing decide release readiness against written acceptance criteria, and both fail in predictable ways when the criteria or the test data are loose.
System testing verifies the fully integrated product against its specified requirements in a production-like environment. End-to-end testing is the main technique inside it: driving a complete user journey through the real UI and services, such as browsing the menu, paying, and receiving an order confirmation.
User acceptance testing is the check by business users or customers that the product meets their needs, ending in an accept or reject decision.
E2E suites turn flaky for three recurring reasons, each with a specific fix:
- Assertions fire before async UI rendering completes. Wait on observable conditions, such as element state or network responses, and drop fixed sleeps.
- Parallel tests edit the same account, cart or stock count. Have each test create and clean up its own data.
- Third-party sandboxes with rate limits, downtime or production-divergent behavior fail builds for reasons unrelated to your code. Stub the provider in most runs, keep a few scheduled runs against the real sandbox, and let contract tests cover the rest.
A flaky test that gets re-run until it passes teaches the team to ignore red builds. Our recommendation is a small E2E set on revenue paths (see test automation strategy), automated, with every failure investigated.
UAT without written criteria turns into opinion. Write each criterion before the session, for example: given a cart with two items and a valid card, when the customer confirms, then an order confirmation appears and the kitchen receives the ticket. The verdict is then pass or fail per criterion, not a discussion of taste.
Alpha testing runs the same checks with internal users in a controlled environment. Beta testing releases to a limited group of real users in the real environment. Keep UAT, alpha and beta judgment manual, and automate only criteria that are deterministic.
What is the difference between functional and non-functional testing?
Functional testing fits a check whose oracle is a specified behavior, and non-functional testing fits a check whose oracle is a quality threshold such as speed, security, or accessibility conformance.
Non-functional testing evaluates how well the product delivers its behavior against a measurable quality attribute. ISO/IEC 25010 groups these attributes into characteristics such as performance efficiency, security, compatibility, and reliability. Functional testing asks "did it do the right thing?", and non-functional testing asks "did it do it well enough?"
The classification test is to ask what a failure would look like. If the system produced a different result than the specification, the check is functional. If it produced the right result too slowly, insecurely, or in a way some users can't operate, the check is non-functional. The table applies this to the running food-ordering product:
| Check | Oracle | Class |
|---|---|---|
| Order total includes the delivery fee | Pricing rule in the acceptance criteria | Functional |
| Confirmation appears after a successful payment | Specified journey outcome | Functional |
| Checkout responds within an agreed limit at 500 concurrent users (illustrative figures) | Response-time threshold | Non-functional |
| Menu screen meets WCAG 2.2 level AA | Published conformance level | Non-functional |
Smoke testing, sanity testing, and regression testing are all functional types, because each compares behavior with a specified result. They differ in scope and trigger (see Smoke vs sanity vs regression testing). Unit, integration, system, and acceptance testing are levels, and either class can run at any of them.
Two edge cases blur the line. A load test with functional assertions, such as "every order still totals correctly under load", mixes both oracles, so label each assertion separately. A threshold written into acceptance criteria ("the menu loads in two seconds") is still non-functional, because the oracle is a limit. Accessibility sits on the non-functional side, and accessibility testing covers how to check WCAG conformance.
Smoke vs sanity vs regression testing
The difference that decides the choice is scope: smoke testing gates a whole build, sanity testing gates one change, and regression testing guards everything already shipped.
Smoke testing is a shallow pass over the core paths that decides whether a build is stable enough to test further. Sanity testing is a narrow check that a specific fix or small change behaves as intended. Regression testing re-runs existing tests to confirm a change has not broken behavior that worked before.
The side-by-side comparison, using a food-ordering app as the running product:
| Smoke | Sanity | Regression | |
|---|---|---|---|
| Scope | Launch, log in, open menu, place a test order | The one changed area, such as a corrected tax calculation at checkout | Every previously working feature the change could touch, up to the full suite |
| Trigger | Every new build or deployment to an environment | A bug fix or small change landing on a build that passed smoke | Each merge, nightly run, and pre-release gate |
| Owner | Delivery pipeline, maintained by developers | QA engineer or the developer who made the change | QA and automation engineers |
| Automate? | Yes, always | Usually manual or an ad hoc script; automate only if the check recurs | Yes, for stable and deterministic checks |
Regression suites outgrow the pull-request pipeline because they gain tests with every feature and every fixed defect, and they rarely lose any. A suite that ran in minutes at launch can take hours a year later, and developers then skip it or ignore its failures.
We suggest splitting the suite by trigger. Run the smoke subset on every pull request, run tests selected by the changed code on merge, and run the full suite nightly and before release. Tag tests by tier, quarantine flaky ones, and prune duplicates (see Which tests run at which stage of delivery? and test automation strategy).
Teams use these terms loosely, and some treat sanity testing as a subset of regression testing. A small product with a fast suite can skip the split and run everything on each pull request.
Black box vs white box vs gray box testing
Black box, white box and gray box testing differ in what the tester can see. Choose black box when the defects that matter are wrong behavior against requirements, white box when they hide in code paths, and gray box when partial knowledge of internals sharpens the checks.
Black box testing derives checks from specified behavior without looking at the code. White box testing derives them from the code's structure: branches, conditions and error handlers. Gray box testing sits between the two, with the tester knowing the API schema, database model or logs but not the implementation.
The techniques side by side, using the order-placement flow of the sample ordering app:
| Black box | White box | Gray box | |
|---|---|---|---|
| Tester sees | Inputs, outputs, requirements | Source code, branches | API contracts, DB schema, logs |
| Defects it targets | Wrong order total, missing confirmation, broken journey | Untested branch, such as an expired-coupon path or an unhandled payment timeout | Order saved with the wrong status, or a 200 response with no queue message published |
| Typical owner | QA, product owner | Developer | QA engineer or SDET, paired with a developer |
| Typical level | System, acceptance | Unit, component | Integration, API |
| Automate? | Stable journeys yes; exploratory stays manual | Yes, on every commit | Yes, in the pull-request pipeline |
Technique and level are separate axes. A developer who tests a pricing function only through its public interface is doing black box testing at the unit level, so owner follows visibility and not job title.
We recommend mapping the choice to the defects you rank highest, which is what risk-based testing formalizes. If the worst failure is a silent data error behind a green UI, add gray box checks on the API and database.
White box has one limit worth knowing. Branch coverage shows that code ran, not that the assertions (the oracle) were right, so a high coverage number can sit on top of weak tests.
Which non-functional test types matter?
Five non-functional test types matter for most products: performance, security, usability, accessibility and compatibility, drawn from the ISO/IEC 25010 quality model and, for accessibility, WCAG 2.2. Each earns its cost only when a specific event triggers it.
Performance testing splits into load testing (expected peak traffic), stress testing (traffic beyond capacity, to find the breaking point and watch recovery) and soak testing (normal load held for hours, to expose memory leaks and exhausted connection pools). Tooling options are compared in performance testing tools.
The common failure is trusting performance numbers from the wrong environment. In the sample ordering app, a staging stack with one instance and a small database will pass a lunch-rush load test that production fails because query plans change with data volume, caches start warm, and real gateways add latency.
Before running any performance type, match instance classes, configuration and data volume to production, and replay third-party latency. If you can't, use the results only to compare builds on that same environment, not to size capacity.
The triggers for each type:
| Type | Run it when | Sample check | Automate? |
|---|---|---|---|
| Load | A campaign, launch or new region will raise traffic | Peak concurrent orders stay inside the response-time target | Yes, scheduled and before launches |
| Stress | Capacity planning or autoscaling rules change | Order service degrades gracefully and recovers after overload | Yes, on demand |
| Soak | A runtime, driver or dependency upgrade ships | Memory and connections stay flat over a long run | Yes, nightly or pre-release |
| Security | Authentication, payments or dependencies change | No injection or broken access control on order endpoints | Scans yes; schedule a penetration test before major releases |
| Usability | A flow is redesigned or a new audience is targeted | New users complete checkout unaided | No, needs human judgment |
| Accessibility | UI components change | Menu and checkout meet WCAG 2.2 criteria | Partly: linters catch some issues, manual review the rest |
| Compatibility | A new browser, OS or device tier enters your support list | Checkout renders and submits on each supported browser and device | Yes, across a device matrix |
Compatibility testing is the cheapest to automate and the easiest to let drift. Tie the support matrix to your analytics, and review it whenever a platform vendor ships a major release.
Which tests run at which stage of delivery?
Unit tests and static checks run on every commit, integration and smoke tests on every pull request, system and full regression suites in staging, acceptance and non-functional checks before release, and smoke tests plus monitoring in production. The placement follows the test pyramid: the cheapest, fastest checks run earliest and most often.

The table maps each stage to what runs, who owns it and whether to automate it:
| Stage | Tests that run | Owner | Automate? |
|---|---|---|---|
| Commit | Unit tests, linting, static analysis | Developer | Yes. Keep it fast enough that nobody skips it |
| Pull request | Integration and contract tests, smoke testing on a preview build, regression tests tagged to the changed area | Developer and reviewer | Yes |
| Staging | System testing with the end-to-end suite, full regression suite, exploratory sessions | QA engineer | Automate regression; keep exploratory manual |
| Pre-release | User acceptance testing, load and security scans, accessibility and compatibility checks | Product owner and QA | UAT and usability manual; scans automated |
| Production | Post-deploy smoke testing, synthetic monitoring, canary checks | Platform or on-call engineer | Yes |
Smoke testing appears twice on purpose. On the pull request it confirms the build starts and the core paths respond. After deploy it confirms the same paths work against real configuration, secrets and third-party endpoints that staging only approximates.
The usual bottleneck in this layout is the full regression suite. Once it outgrows what a developer will wait for on a pull request, run a risk-ranked subset there and push the rest to a nightly or staging run (see risk-based testing for how to rank it).
This table assumes separate staging and pre-release environments. Teams on trunk-based development with ephemeral preview environments often merge those two stages and run the system suite on the pull request. Regulated products may add a mandatory manual gate before release regardless of automation coverage.
What is the test pyramid and when should its shape change?
The test pyramid is a model for sizing a suite by layer: many fast unit tests at the base, fewer integration tests in the middle, and a small number of end-to-end tests at the top.

Cost, run time and flakiness all rise toward the top, as the Practical Test Pyramid on martinfowler.com lays out. For teams applying this model to user interfaces, our guide to automated front-end testing shows how the layers map onto component tests, browser-based checks and end-to-end journeys.
The layers compare as follows (qualitative ratings, not measurements):
| Layer | Cost to write and maintain | Speed | Flakiness risk |
|---|---|---|---|
| Unit testing | Low | Milliseconds per test | Low |
| Integration testing | Medium | Seconds per test | Medium: real databases, network, API contracts |
| End-to-end testing | High | Minutes per journey | High: async UI, shared data, third-party sandboxes |
Keep the pyramid when most of your risk sits in logic you own, such as pricing rules, state machines and calculations. Unit tests cover those branches cheaply, and a handful of end-to-end journeys confirm the wiring.
Use a trophy shape when the product is UI-thin: static analysis forms the base, integration tests that render a component with its real collaborators form the widest band, and unit and end-to-end tests stay small. Little logic lives in any one function, so isolated unit tests mostly restate the implementation.
Move to a honeycomb when the product is a set of API-heavy services. Spotify's engineering team described this shape for microservices: most tests exercise a service through its own boundary, with few tests of internals and few full-system tests. Contract tests keep each boundary honest, as in the menu and payment APIs of the order flow.
This is our recommendation, and no published ratio fits every codebase. The end-to-end layer stays the smallest in all three shapes, and a shape is worth changing only when maintenance cost or missed integration defects show the current one no longer fits.
Manual vs automated testing: Which types to automate
Automated testing fits checks that are repeatable, deterministic and stable, while manual testing fits checks that need human judgment or whose expected result nobody has written down yet.
A check is worth automating when it passes three tests: it runs unchanged on every build, it returns the same verdict for the same code, and its expected result will survive the next UI or API redesign. Failing the first two points to a design problem. Failing the third means the check will need rewriting soon.
The verdict for each type:
| Test type | Verdict | Reason |
|---|---|---|
| Unit testing | Automate | Deterministic, fast, runs on every commit |
| Integration and contract tests | Automate | Pins API shapes so mocks cannot drift unnoticed |
| Smoke testing | Automate | Same shallow path on every build |
| Regression testing | Automate | Repetition is the whole purpose |
| End-to-end testing | Automate selectively | Revenue journeys only; flakiness cost grows with every added case |
| Sanity testing | Either | Manual for a one-off fix; automate once the fix earns a regression test |
| Performance and load | Automate the run, review by hand | Needs a production-like environment; people interpret the results |
| Security | Automate scans, review manually | Scanners find known patterns; logic flaws need a reviewer |
| Accessibility, compatibility | Split | Scripts catch missing labels and browser matrix failures; screen-reader and real-device passes stay manual (see accessibility testing) |
| Exploratory testing | Manual | The tester's judgment is the oracle |
| Usability testing | Manual | Confusion is observed, not asserted |
| User acceptance testing | Manual | Accept or reject is a business decision |
Bug types follow the same split. Logic errors, regressions and broken contracts are mechanical, so automation catches them cheaply on every run. Confusing flows, features that work but feel wrong, and unexpected input combinations tend to surface only when someone explores without a script.
Automating exploratory work produces tests that freeze today's behavior, including its flaws. Our view is to let a person find the defect first, then script the regression check.
This table does not apply evenly to every team. A product whose UI changes weekly should defer end-to-end automation and invest at the unit and contract layers. Sequencing and ownership are covered in the test automation strategy guide and QA best practices.
Types of bugs in software testing and the test that catches each
Each bug class has one test type that catches it most cheaply: logic bugs surface in unit tests, interface bugs in integration testing, and capacity bugs in load testing. The examples below use one food-ordering product with a menu, a payment API and order confirmation.
The table maps each bug class to its best catcher:
| Bug class | Example | Test type most likely to catch it | Cheapest level |
|---|---|---|---|
| Logic | A promo code discounts the order total twice | Unit testing (white box) | Unit |
| Interface | The payment provider renames a field and the order is rejected | Integration testing with contract tests | Integration |
| Functional | An order submits without a delivery address | System testing against acceptance criteria | System |
| Regression | A menu-pricing change breaks promo codes | Regression testing | Unit and API suites |
| Performance | Checkout times out during the lunch rush | Load testing | Pre-release, production-like environment |
| Security | Changing an order ID in the URL shows another customer's order | Security testing | API or system |
| Usability | Users cannot find the reorder button | Usability testing (manual) | System or UAT |
| Compatibility | The confirmation page breaks on iOS Safari | Compatibility testing | System, browser and device matrix |
Our rule is to push each class down to the lowest level that can still reproduce it. Logic and regression bugs move all the way to unit and API level, where runs take seconds and failures point to a function.
Performance and compatibility bugs cannot move down. They depend on the environment, so a load test against a laptop-sized staging database or a browser matrix that omits real mobile devices will pass while production fails. Security sits in between: static analysis catches some flaws at commit, but access-control bugs like the order-ID example need a running system.
Next step: Map your current tests to the four axes
List the tests your team runs today and tag each one with its level, objective, technique and execution mode. The gaps show up quickly: usually a missing contract layer, an end-to-end suite that has grown too large, or non-functional checks that only run before major launches. If you want a second view on that map or help building the missing layers, talk to our team.
