Functional testing vs non-functional testing is the first big split in the types of testing. Functional testing checks what the software does: does login work, does search return the right products, is the bill total correct. Non-functional testing checks how well it does it: is it fast enough, does it survive a sale-day crowd, is it secure, can people use it easily. A feature can pass every functional test and still fail users if it is slow or unsafe.
Functional vs non-functional testing: the comparison table
| Point | Functional testing | Non-functional testing |
|---|---|---|
| Question | Does the feature work correctly? | How well does the system work? |
| Based on | Functional requirements, user stories | Quality requirements: speed, load, security, usability |
| Example requirement | "User can log in with a valid email and password" | "Login responds within 2 seconds for 1,000 users at once" |
| Result | Pass or fail against expected output | Often a measurement compared with a target |
| Types | Unit, integration, system, smoke, sanity, regression, acceptance | Performance, load, stress, security, usability, compatibility, accessibility |
| Done mostly | Manually or with UI and API automation | With specialist tools, plus some manual checks |
| Tools | Selenium, Playwright, Postman, JUnit, TestNG | JMeter, Gatling, k6, OWASP ZAP, Lighthouse |
| Fresher roles | Very common | Usually added after functional basics |
Login vs performance: the clearest example
Take the login page of a college results website.
Functional test cases check behaviour:
| ID | Steps | Expected result |
|---|---|---|
| F1 | Enter a valid hall ticket number and date of birth, click Login | Results page opens |
| F2 | Enter a wrong date of birth | "Invalid details" message |
| F3 | Leave both fields empty, click Login | "Hall ticket number is required" |
| F4 | Click Logout | User returns to the login page |
Non-functional test cases check qualities of the same page:
| ID | Type | Check | Target |
|---|---|---|---|
| N1 | Performance | Time from clicking Login to the results page | Under 2 seconds |
| N2 | Load | 5,000 students log in during the same 10 minutes | Response stays under 3 seconds, no errors |
| N3 | Stress | Keep adding users until the site fails | Find the breaking point; site recovers afterwards |
| N4 | Security | Try a SQL injection string in the hall ticket field | Input is rejected; no data is exposed |
| N5 | Usability | A first-time user finds the Login button | Without help, in a few seconds |
| N6 | Compatibility | Open the page on Chrome, Firefox, Safari and a mobile browser | Layout and login work on all |
On results day, F1 to F4 can all pass and the site can still crash under N2. That is the classic reason non-functional testing matters.
Types of functional testing
| Type | What it checks |
|---|---|
| Unit testing | One method or class, usually by developers |
| Integration testing | Modules working together, such as the app and its database |
| System testing | The complete application against requirements |
| Smoke testing | Main features on a new build, to decide if it is testable |
| Sanity testing | A specific fix or change |
| Regression testing | Old features still work after changes |
| User acceptance testing (UAT) | Business users confirm it meets their needs |
The smoke and sanity difference has its own page: smoke vs sanity testing.
Types of non-functional testing
| Type | What it checks | Simple example |
|---|---|---|
| Performance | Speed and responsiveness at normal load | Search returns in under 1 second |
| Load | Behaviour at expected peak users | Sale day traffic |
| Stress | Behaviour beyond the limit, and recovery | Double the expected traffic |
| Endurance (soak) | Stability over a long period | Run at normal load for 12 hours, watch memory |
| Scalability | Whether adding servers raises capacity | Two servers handle about twice the users |
| Security | Protection against attacks and misuse | SQL injection, weak passwords, exposed data |
| Usability | Ease of use | New users complete checkout without help |
| Compatibility | Works across browsers, devices and OS versions | Chrome, Safari, Android, iOS |
| Accessibility | Usable by people with disabilities | Screen readers, keyboard-only use, colour contrast |
| Reliability and recovery | Recovers after failures | Server restarts without losing orders |
Common mistake: Writing a non-functional requirement without a number. "The page should be fast" cannot be tested. "The page loads in under 2 seconds for 95% of requests at 500 users" can. When you see a vague requirement, ask for a measurable target.
How each is tested in practice
Functional testing starts with test cases written from requirements, often in a tool such as Jira or TestRail. Testers run them by hand, then automate stable ones with Selenium or Playwright for the UI and Postman or REST Assured for APIs. Most of it is black box testing.
Non-functional testing usually needs tools and a planned environment:
- Apache JMeter or Gatling or k6 to simulate many users for load and stress tests
- OWASP ZAP for basic security scanning
- Lighthouse in Chrome DevTools for page speed and accessibility scores
- real devices or cloud device labs for compatibility
Performance results depend on the test environment, so teams try to test on servers similar to production.
Which matters more?
Both. Functional bugs mean the product does the wrong thing. Non-functional bugs mean it does the right thing too slowly, unsafely or in a way users cannot manage. A banking app that calculates interest correctly but leaks account data has failed.
In most teams, functional testing happens on every feature and every sprint. Major non-functional testing, especially load and security, is often scheduled before big releases or expected traffic peaks, with lighter automated checks running more often.
For freshers: what to learn first
- Functional testing basics: test case writing, boundary values, bug reports.
- API testing with Postman, since most apps are API-driven. See API testing interview questions.
- UI automation with one tool. Read manual vs automation testing to plan this step.
- Performance basics with JMeter: record a simple flow and run it with 50 virtual users.
Then prepare with manual testing interview questions, which often include "give one functional and one non-functional example".
Interview note: Use one feature for both: "For login, a functional test checks that valid details open the dashboard and invalid ones show an error. A non-functional test checks that login stays under 2 seconds when 1,000 users log in together, using JMeter." One example, two angles, is easy for the interviewer to follow.
Frequently Asked Questions
Is performance testing functional or non-functional?
Is security testing functional or non-functional?
Is regression testing functional or non-functional?
Which should a fresher learn first?
Can non-functional testing be done manually?
Want to Build Your Career in Java Full Stack with AI?
Join CodeBegun and train with working industry engineers — Check the Java Full Stack training details

