Functional testing checks what a system does: whether each feature behaves as the requirements say. Non-functional testing checks how well it does it: speed, security, usability, reliability and similar qualities. Functional vs non functional testing is not a choice, because software that does the right thing slowly, insecurely or confusingly is still a failed product.
A simple way to remember it: functional tests ask "does the Pay button charge the card?", non-functional tests ask "does it still work with 5,000 people paying at once, and is the card number protected?"
Functional testing verifies behaviour against requirements. The tester supplies input, observes the output or state change, and compares it with the expected result. It is usually black box, so it does not depend on how the code is written.
Examples for an online shop:
SAVE10 reduces the cart total by 10 percent.| Type | What it checks | Example |
|---|---|---|
| Unit testing | One function or class in isolation | A price calculator returns the right total |
| Integration testing | Modules working together | The cart service reads prices from the catalog service |
| System testing | The complete application against requirements | A full purchase, from search to confirmation |
| Smoke and sanity testing | A quick check that the build is usable | The app starts and login works |
| Regression testing | Old features still work after a change | Checkout still works after a new coupon feature |
| User acceptance testing | Business users confirm it meets their needs | Finance approves the invoice format |
Non-functional testing measures quality attributes that the requirements often describe as targets, such as "the search page loads in under two seconds for 95 percent of requests". These requirements are easy to forget, and they are where many production incidents come from.
| Type | Question it answers | Example |
|---|---|---|
| Performance testing | How fast is it under expected load? | Median response time of the checkout API |
| Load testing | Does it cope with the expected peak? | 2,000 concurrent users on a sale day |
| Stress testing | What happens beyond the limit? | Doubling traffic until the service fails and checking how it recovers |
| Scalability testing | Does adding servers add capacity? | Throughput with two nodes versus four |
| Security testing | Can it be attacked or misused? | SQL injection, broken access control, weak sessions |
| Usability testing | Can people use it easily? | New users finish checkout without help |
| Accessibility testing | Can people with disabilities use it? | Screen reader can complete the form |
| Compatibility testing | Does it work across browsers, devices, OS versions? | Safari on iPhone and Chrome on Android |
| Reliability and recovery testing | Does it stay up and recover from failure? | Restart the database and check the app reconnects |
| Localization testing | Does it work for other languages and regions? | Date formats and right-to-left text |
Take a login page and test it from both sides.
Functional tests:
Non-functional tests:
A tiny performance check can be scripted. This example uses the k6 load testing tool in JavaScript:
The check is a small functional assertion. The thresholds are the non-functional part: the run fails if the 95th percentile response time passes 500 ms or more than 1 percent of requests fail.
| Aspect | Functional | Non-functional |
|---|---|---|
| Focus | What the system does | How well it does it |
| Based on | Functional requirements and user stories | Quality targets and constraints |
| Result | Pass or fail against expected output | Measured against a threshold or benchmark |
| Typical tools | Selenium, Playwright, Cypress, JUnit, pytest | k6, JMeter, Gatling, OWASP ZAP, Lighthouse |
| When | Throughout development | Usually once features are stable, with early checks where possible |
Regression testing is usually functional because it checks that existing features still behave correctly. The same idea applies to performance regression, where you re-run a load test to check speed did not drop.
No. Usability is a non-functional quality, because it measures how easy the system is to use rather than whether a feature produces the correct result.
Functional testing usually comes first, since there is little value in measuring the speed of a feature that does not work. Plan non-functional tests early though, as architecture decisions affect them heavily.
Some can. Playwright can check behaviour and capture timings, and k6 can assert on responses while measuring speed, but dedicated tools go deeper for load and security work.
Functional testing confirms that features do what the requirements state, while non-functional testing confirms the system is fast, secure, usable, accessible and reliable enough to be trusted. Write measurable targets for the second group, automate the first group in continuous integration, and plan both from the start of a project.