Functional Testing
What is Functional Testing?
Functional testing verifies software behavior by giving it inputs and comparing actual results with the expected results in the requirements. It is black-box testing, separate from checks on performance or security.
Updated November 2026 · 3 min read
Functional testing checks that software does what it is supposed to do. Testers or automated tests supply inputs, perform actions and compare the actual results with the expected results defined in the requirements. If a user enters a valid discount code at checkout, the total should fall by the right amount; if they enter an expired one, they should see a clear error and the total should not change. Functional testing is concerned with behavior, not with how the code is written internally, which is why it is usually described as black-box testing.
It is distinct from non-functional testing, which checks qualities such as performance, security, reliability and accessibility. A feature can pass every functional test and still be too slow or insecure to release, so teams need both.
Types of functional testing
| Type | What it checks | Typically done by |
|---|---|---|
| Unit testing | Individual functions or components in isolation | Developers, automated |
| Integration testing | That components and services work together correctly | Developers and QA, mostly automated |
| System testing | The complete application against its requirements | QA |
| Smoke testing | That the most important functions work after a build or deploy | Automated, run on every build |
| Regression testing | That existing features still work after a change | Mostly automated |
| End-to-end testing | Complete user journeys across the whole stack | QA, automated where stable |
| User acceptance testing | That the software meets business needs, from the user's perspective | Business users or customers |
Some lists also treat unit and integration tests as separate from functional testing because they look at code structure. In practice most teams count them as layers of functional verification.
How to do functional testing
- Understand the requirements. Start from user stories, acceptance criteria and functional requirements.
- Identify test conditions. List what must be verified, including normal cases, edge cases and error cases.
- Design test cases. For each condition, define inputs, steps and expected results. Techniques such as equivalence partitioning and boundary value analysis keep the number manageable.
- Prepare data and environment. Use a test environment that resembles production, with realistic test data.
- Execute. Run tests manually or with automation, and record results.
- Report and fix. Log defects with steps to reproduce, then retest fixes and rerun regression tests.
Functional testing example
Consider a hypothetical requirement: "Orders of $50.00 or more get free shipping; orders under $50.00 pay a $5.99 flat rate." Boundary value analysis gives a small, strong set of test cases:
| Order subtotal | Expected shipping | Why this case |
|---|---|---|
| $49.99 | $5.99 | Just below the boundary |
| $50.00 | $0.00 | Exactly on the boundary |
| $50.01 | $0.00 | Just above the boundary |
| $0.00 (empty cart) | Checkout blocked | Edge case |
| $60.00 with a $15.00 discount | Unclear: $5.99 if the threshold applies after discounts, $0.00 if before | Checks how discounts interact with the threshold |
The last case often finds a bug, because the requirement does not say whether the threshold applies before or after discounts. Here the subtotal after discount is $45.00, below the threshold, while the subtotal before discount is $60.00, above it. Writing the test forces the team to ask the product manager, and the answer is added to the acceptance criteria. That is a common pattern: designing functional tests exposes ambiguous requirements before customers do.
Common pitfalls
- Testing only the happy path. Most defects hide in edge cases, invalid inputs and error handling.
- Vague expected results. "Works correctly" is not an expected result. Define exact outputs.
- Automating unstable features too early. Tests on rapidly changing UI break constantly. Automate once behavior settles.
- Skipping regression. New features often break old ones. Automated regression suites catch this.
- Ignoring non-functional testing. Passing functional tests does not mean the system is fast, secure or accessible.
Functional testing is part of quality assurance and includes unit testing, end-to-end testing and user acceptance testing. It works best alongside exploratory testing, which finds the cases nobody thought to write down.
Frequently asked questions
What is the difference between functional and non-functional testing?
Functional testing checks what the software does by comparing actual results with the expected results in the requirements. Non-functional testing checks qualities such as performance, security, reliability and accessibility. A feature can pass every functional test and still be too slow or insecure to release, so teams need both kinds of testing.
What are the main types of functional testing?
Common types of functional testing are unit testing of individual components, integration testing of components working together, system testing of the full application, smoke testing after each build, regression testing after changes, end-to-end testing of complete user journeys, and user acceptance testing by business users. Most teams treat these as layers of functional verification.
How is boundary value analysis used in functional testing?
Boundary value analysis tests inputs just below, exactly on and just above a threshold, where defects often hide. For free shipping at $50.00, test $49.99, $50.00 and $50.01, plus edge cases such as an empty cart or a discount that crosses the threshold. These cases often expose ambiguous requirements before customers find them.
Related terms
Functional Requirements
Statements of the behaviors a system has to provide.
Quality Assurance (QA)
Process-level work that prevents defects instead of only catching them.
Unit Testing
Automated tests of individual functions or classes in isolation.
User Acceptance Testing (UAT)
Final check by business users that a system is ready to go live.