Getting everything ready for you…

Loading courses, problems and your progress. This takes just a moment.

0s

Guides › Software Testing & QA

Functional vs Non-Functional Testing

Understand functional and non-functional testing, their differences, types, real-world examples, test cases, and software testing best practices.

Functional vs Non-Functional Testing: Complete Guide

Software testing helps teams verify that an application behaves correctly and provides a reliable user experience. Two major categories of software testing are functional testing and non-functional testing.

Functional testing checks what a system does. Non-functional testing checks how well the system performs and whether it meets quality requirements such as performance, security, usability, and reliability.

Both are important for delivering high-quality software.

In this guide, you will learn their definitions, differences, types, practical examples, test cases, tools, exercises, and interview questions.

Table of Contents

  1. What Is Functional Testing?
  2. What Is Non-Functional Testing?
  3. Functional vs Non-Functional Testing
  4. Types of Functional Testing
  5. Types of Non-Functional Testing
  6. Real-World Examples
  7. Sample Test Cases
  8. Functional and Non-Functional Requirements
  9. Testing Tools
  10. Common Mistakes
  11. Best Practices
  12. Practical Exercises with Solutions
  13. Interview Questions and Answers
  14. Frequently Asked Questions
  15. Conclusion

1. What Is Functional Testing?

Functional testing verifies whether software features work according to specified requirements.

It focuses on inputs, outputs, business rules, user actions, and expected system behavior.

Example

Consider an online shopping website.

A user:

  1. Opens a product page.
  2. Selects a product.
  3. Adds the product to the cart.
  4. Proceeds to checkout.
  5. Places an order.

Functional testing checks whether these actions work correctly according to the requirements.

Questions Functional Testing Answers

Characteristics of Functional Testing

2. What Is Non-Functional Testing?

Non-functional testing evaluates quality attributes and operational characteristics of a software system.

It checks whether the system meets requirements for performance, security, usability, reliability, compatibility, accessibility, and other quality attributes.

Example

Imagine that an online shopping website allows customers to place orders correctly.

However, during a sale, the website takes 20 seconds to load each page.

The ordering feature may work functionally, but the poor response time can make the website difficult to use.

Non-functional testing helps evaluate whether the website meets its agreed performance targets under specified conditions.

Questions Non-Functional Testing Answers

Characteristics of Non-Functional Testing

3. Functional vs Non-Functional Testing

The key distinction is that functional testing focuses on what the system does, while non-functional testing focuses on how well the system does it.

Comparison Functional Testing Non-Functional Testing
Main focus Features and business rules Quality attributes
Main question Does it work correctly? How well does it work?
Requirements Functional requirements Non-functional requirements
Examples Login, search, checkout Performance, security, usability
Expected results Correct outputs and behavior Quality targets and acceptable limits
Test data Inputs for feature behavior Workloads, environments, usage patterns, and security scenarios
Tools Selenium, Playwright, Postman JMeter, k6, Lighthouse, security tools
Execution Manual or automated Manual, automated, or tool-assisted
Typical measurements Correct result, validation, workflow completion Response time, throughput, resource use, accessibility, and risk
Example failure Login rejects valid credentials Login takes too long under expected load

The tool choice depends on the type of application and the requirement. Some tools can support more than one testing category.

Simple Example

For a login page:

Functional testing

Non-functional testing

A single feature can require both categories of testing.

4. Types of Functional Testing

4.1 Unit Testing

Checks a small, isolated part of an application, such as a function or method.

Example: Verify that a function calculates a discount correctly.

Unit tests are commonly written by developers, although QA engineers may also contribute.

4.2 Integration Testing

Checks whether components or services work correctly together.

Example: Verify that an order service sends the correct information to a payment service.

4.3 System Testing

Tests the integrated application as a whole against its requirements.

Example: Verify the complete shopping workflow from login to order confirmation.

4.4 Smoke Testing

Performs a basic set of checks to determine whether a build is stable enough for further testing.

Example: Open the application, log in, open a product, and verify that the main pages load.

4.5 Sanity Testing

Performs focused checks around a particular change or fix.

Example: After a search-filter fix, verify the affected filters and closely related search behavior.

Teams sometimes use the terms smoke and sanity differently, so follow the project's definitions.

4.6 Regression Testing

Checks whether a change has unintentionally affected previously working functionality.

Example: After modifying checkout, verify that cart totals, order placement, and order history still work.

4.7 User Acceptance Testing (UAT)

Checks whether the software satisfies business needs and is suitable for its intended use.

It is commonly performed by business representatives, customers, or designated users.

4.8 API Functional Testing

Checks API endpoints, status codes, response bodies, validation, authorization, and business rules.

Example: Verify that creating an order returns the expected response and stores the correct order details.

4.9 Positive Testing

Uses valid inputs and expected user actions.

Example: Log in with a valid account.

4.10 Negative Testing

Uses invalid inputs or unexpected actions to verify that the application handles them correctly.

Example: Submit an invalid email address and confirm that appropriate validation appears.

5. Types of Non-Functional Testing

5.1 Performance Testing

Evaluates system speed, responsiveness, throughput, and resource usage.

Example: Measure product-search response times under a defined workload.

Performance testing is a broad category that includes several approaches.

Load Testing

Checks system behavior under an expected or specified workload.

Example: Simulate the anticipated number of concurrent shoppers.

Stress Testing

Evaluates behavior beyond normal operating conditions to identify limits and failure behavior.

Example: Increase traffic beyond the expected peak and observe how the system responds.

Spike Testing

Checks the system's response to a sudden increase or decrease in workload.

Example: Simulate a large traffic spike after a promotional notification.

Endurance Testing

Checks stability during sustained operation.

Example: Run a representative workload for several hours and monitor resource usage.

Scalability Testing

Evaluates how system performance changes as workload or available resources increase.

5.2 Security Testing

Evaluates whether the application protects information and prevents unauthorized actions.

Example: Verify that one user cannot access another user's private order by changing an order identifier.

Security testing should be authorized and conducted within an approved scope.

5.3 Usability Testing

Evaluates whether users can understand and operate the application effectively.

Example: Ask representative users to complete registration and observe where they encounter confusion.

5.4 Compatibility Testing

Checks behavior across supported browsers, operating systems, devices, and screen sizes.

Example: Verify that the checkout flow works on the browsers listed in the product's support policy.

5.5 Accessibility Testing

Evaluates whether people with disabilities can use the application.

Checks may include:

Automated tools can identify some accessibility problems, but they cannot replace all manual checks.

5.6 Reliability Testing

Evaluates whether a system performs consistently over time and under expected operating conditions.

Example: Monitor an application during sustained normal usage and check for recurring errors.

5.7 Recovery Testing

Checks whether the system can recover appropriately after a failure.

Example: Verify that an application restores service after a controlled service interruption and that committed data remains correct.

5.8 Installation and Upgrade Testing

Checks installation, configuration, updates, and removal where applicable.

Example: Verify that a new application version installs without losing required user settings.

5.9 Localization Testing

Checks behavior for supported languages and regional settings.

Example: Verify translated text, date formats, currency formatting, and layouts for a supported locale.

5.10 Compliance Testing

Checks whether the system meets applicable standards, contractual obligations, or regulatory requirements.

The relevant requirements depend on the application and its operating context.

6. Real-World Examples

Example 1: E-Commerce Website

Functional tests

Non-functional tests

Example 2: Banking Application

Functional tests

Non-functional tests

Financial systems require carefully controlled test environments and test data.

Example 3: Food Delivery Application

Functional tests

Non-functional tests

Example 4: Video Streaming Application

Functional tests

Non-functional tests

7. Sample Test Cases

7.1 Functional Test Case: Login

Test Case ID: FT-LOGIN-001

Title: Verify login with valid credentials.

Preconditions: An active test account exists.

Steps:

  1. Open the login page.
  2. Enter a valid test email.
  3. Enter the corresponding password.
  4. Click Login.

Expected Result: The user is authenticated and redirected to the expected page.

Actual Result: Record the result observed during execution.

Status: Pass or Fail based on the observed result.

7.2 Functional Test Case: Invalid Login

Test Case ID: FT-LOGIN-002

Title: Verify that invalid credentials are rejected.

Steps:

  1. Open the login page.
  2. Enter an invalid test password.
  3. Submit the form.

Expected Result: Authentication fails and the application displays an appropriate, non-sensitive message.

7.3 Functional Test Case: Shopping Cart

Test Case ID: FT-CART-001

Title: Verify that cart quantity updates correctly.

Steps:

  1. Add an available test product to the cart.
  2. Increase its quantity.
  3. Observe the cart quantity and total.

Expected Result: Quantity and total follow the defined pricing rules.

7.4 Non-Functional Test Case: Page Performance

Test Case ID: NFT-PERF-001

Title: Verify product-page response time under a defined workload.

Preconditions: The approved performance test environment is available.

Steps:

  1. Configure the representative workload.
  2. Run the test for the specified duration.
  3. Record response times, throughput, error rates, and resource usage.
  4. Compare the measurements with the agreed performance requirements.

Expected Result: The product page meets the documented performance targets under the tested conditions.

Avoid inventing a universal response-time threshold. Use the actual target specified by the project.

7.5 Non-Functional Test Case: Accessibility

Test Case ID: NFT-A11Y-001

Title: Verify keyboard navigation on the login page.

Steps:

  1. Open the login page.
  2. Navigate using the keyboard without a mouse.
  3. Move through the interactive controls.
  4. Submit the form using the supported keyboard interaction.

Expected Result: Interactive elements can be reached and operated appropriately, with a visible focus indicator and understandable labels.

7.6 Non-Functional Test Case: Compatibility

Test Case ID: NFT-COMP-001

Title: Verify checkout on supported browsers.

Steps:

  1. Open the staging application in each supported browser.
  2. Add a test product to the cart.
  3. Complete the approved test checkout flow.
  4. Compare the behavior across browsers.

Expected Result: The checkout flow behaves consistently with the requirements on all supported browsers.

8. Functional and Non-Functional Requirements

Requirements define what the system must do and the quality levels it must achieve.

Functional Requirement Example

"The system shall allow registered users to reset their password using the approved password-reset workflow."

This describes a capability.

Non-Functional Requirement Example

"Under the defined workload and test environment, 95% of product-search requests shall complete within the agreed response-time limit."

This describes a measurable performance target.

The workload, environment, measurement method, and response-time limit must be specified by the project. The example deliberately does not assume a universal threshold.

How to Write Better Non-Functional Requirements

A useful non-functional requirement should be measurable and testable.

Instead of:

"The application should be fast."

Write a requirement that defines:

Instead of:

"The application should be secure."

Define applicable security controls, authorization rules, threat scenarios, and verification criteria.

Instead of:

"The website should be easy to use."

Identify representative users, important tasks, and measurable usability criteria where appropriate.

9. Testing Tools

Different tools support different testing needs. Choose tools based on the application, team skills, and requirements.

Tool Common Use
Selenium Browser automation
Playwright Web application automation
Cypress Front-end and browser-based testing
Postman API testing
pytest Python testing
JUnit Java testing
Apache JMeter Load and performance testing
k6 Performance and load testing
Lighthouse Web performance and selected quality audits
OWASP ZAP Web application security testing
axe tools Accessibility testing support
Browser developer tools Debugging, network inspection, and performance analysis
Jira Issue and defect tracking

Some tools support overlapping capabilities. For example, browser automation can verify functional behavior and collect performance-related measurements, but dedicated performance testing may still be necessary.

10. Common Mistakes

Mistake 1: Testing Only Functionality

An application can produce correct results but still be slow, inaccessible, insecure, or unreliable.

Solution: Include relevant non-functional requirements in the test plan.

Mistake 2: Using Vague Quality Requirements

Statements such as "fast" and "easy to use" are difficult to verify.

Solution: Define measurable targets and clear evaluation criteria.

Mistake 3: Treating Every Test as Only One Category

A feature may require functional and non-functional checks.

Solution: Classify tests according to the specific requirement being verified.

Mistake 4: Ignoring Realistic Workloads

A performance test with an unrealistic workload may not reveal meaningful bottlenecks.

Solution: Use representative workloads and document the test environment.

Mistake 5: Relying Only on Automated Security Scans

Automated tools can miss issues that require context or deeper analysis.

Solution: Combine appropriate automated checks with expert review and other authorized security testing methods.

Mistake 6: Testing Only One Browser

Users may access the application through different supported browsers and devices.

Solution: Use the product's compatibility requirements to define the test matrix.

Mistake 7: Ignoring Accessibility

A visually attractive interface may still be difficult to use with a keyboard or screen reader.

Solution: Include accessibility checks in the testing process.

11. Best Practices

  1. Review functional and non-functional requirements before testing.
  2. Make requirements measurable wherever possible.
  3. Use positive, negative, and boundary-value test cases.
  4. Test complete user workflows as well as individual features.
  5. Identify critical business journeys and quality risks.
  6. Automate repetitive tests when automation is practical.
  7. Use realistic workloads for performance testing.
  8. Conduct security testing only within an authorized scope.
  9. Include accessibility checks early in development.
  10. Test supported browsers, devices, and operating systems.
  11. Record the environment, test data, and observed results.
  12. Track defects and link them to requirements when possible.
  13. Retest fixes and perform relevant regression testing.
  14. Review test coverage and unresolved risks before release.
  15. Update test cases as requirements and application behavior change.

12. Practical Exercises with Solutions

Exercise 1: Classify the Test

A tester checks whether a user can successfully reset a password.

Solution: Functional testing, because it verifies the expected behavior of a feature.

Exercise 2: Classify the Test

A team measures whether an API meets its response-time target with 500 simulated concurrent users.

Solution: Non-functional performance testing, specifically a load test if the workload represents the defined load conditions.

Exercise 3: Classify the Test

A tester checks whether a user can navigate the registration form using only a keyboard.

Solution: Primarily non-functional accessibility testing, although it also verifies the operation of interactive controls.

Exercise 4: Classify the Test

A developer checks whether a discount function returns the correct value for different input prices.

Solution: Functional unit testing.

Exercise 5: Identify the Missing Requirement

A requirement says, "The website should support many users."

What should be clarified?

Solution: Define the expected concurrent workload, workload pattern, environment, performance targets, acceptable error rate, and measurement method.

Exercise 6: Design Both Test Categories

You are testing a video-streaming application. Write one functional test and one non-functional test.

Solution:

Functional test: Verify that clicking Play starts the selected video and that Pause stops playback.

Non-functional test: Measure playback startup time and buffering behavior under defined network conditions and compare the results with the application's requirements.

Exercise 7: Classify the Test

A tester verifies that an application recovers after a controlled service interruption.

Solution: Non-functional recovery testing.

Exercise 8: Plan an E-Commerce Test

Write two functional and two non-functional tests for checkout.

Solution:

Functional:

  1. Verify that valid order details create the correct order.
  2. Verify that invalid required fields are rejected.

Non-functional:

  1. Verify that checkout meets its performance target under the expected workload.
  2. Verify that users cannot access another user's order information without authorization.

13. Interview Questions and Answers

Q1. What is functional testing?

Functional testing verifies that application features and business rules behave according to specified requirements.

Q2. What is non-functional testing?

Non-functional testing evaluates quality attributes such as performance, security, usability, reliability, accessibility, and compatibility.

Q3. What is the main difference between functional and non-functional testing?

Functional testing focuses on what the system does. Non-functional testing focuses on how well it operates and whether it meets specified quality requirements.

Q4. Give an example of functional testing.

Verifying that a registered user can log in with valid credentials is a functional test.

Q5. Give an example of non-functional testing.

Measuring whether an application meets its response-time target under an expected workload is a non-functional performance test.

Q6. Is security testing functional or non-functional?

Security testing is commonly classified as non-functional testing because it evaluates security quality attributes. However, security requirements can also specify functional behavior, such as authorization rules.

Q7. Can functional testing be automated?

Yes. Tools such as Selenium, Playwright, Cypress, and API testing frameworks can automate many functional checks.

Q8. Can non-functional testing be automated?

Yes. Performance tools, accessibility tools, security scanners, and monitoring systems can automate many checks, although some evaluations require manual investigation.

Q9. What is the difference between load testing and stress testing?

Load testing evaluates behavior under a defined expected or specified workload. Stress testing evaluates behavior beyond normal operating conditions to identify limits and failure behavior.

Q10. What is regression testing?

Regression testing checks whether a software change has unintentionally affected previously working functionality.

Q11. What is usability testing?

Usability testing evaluates how effectively representative users can complete tasks and understand an application.

Q12. Why should non-functional requirements be measurable?

Measurable requirements provide clear criteria for deciding whether the application meets its quality expectations.

Q13. Can one test cover functional and non-functional requirements?

A test can collect evidence relevant to both categories, but the team should define separate acceptance criteria where the requirements differ. This makes the results easier to interpret.

Q14. When should non-functional testing begin?

It should be considered during requirements and design stages. Many checks can begin early, rather than waiting until the entire application is complete.

14. Frequently Asked Questions

Is functional testing the same as manual testing?

No. Functional testing describes what is being verified. Manual testing describes how a test is performed. Functional tests can be manual or automated.

Is non-functional testing always automated?

No. Some checks use specialized tools, while usability testing, exploratory accessibility checks, and other evaluations may require human judgment.

Which is more important: functional or non-functional testing?

Neither is universally more important. The balance depends on the application, risks, user needs, and requirements. A system needs correct functionality and suitable quality attributes.

Is performance testing a type of non-functional testing?

Yes. Performance testing evaluates speed, responsiveness, throughput, resource usage, and related characteristics under specified conditions.

Is API testing functional testing?

API testing can verify functional behavior such as responses and business rules. It can also evaluate non-functional attributes such as response time, reliability, and security.

What is the difference between smoke testing and sanity testing?

Smoke testing generally checks whether a build is stable enough for further testing. Sanity testing generally focuses on a particular change or fix. Definitions vary between teams.

Can functional testing identify security issues?

Functional tests may identify some security-related behavior, such as incorrect authorization. However, dedicated security testing is often needed to assess security risks more thoroughly.

Which tools should a beginner learn first?

Start with test case design and manual testing. Then learn an issue tracker, API testing with Postman, and a browser automation tool such as Playwright or Selenium. Learn performance and security testing according to your goals.

15. Conclusion

Functional and non-functional testing are complementary parts of software quality assurance.

Functional testing verifies that features, workflows, and business rules behave as expected. Non-functional testing evaluates whether the application meets quality requirements for performance, security, accessibility, reliability, usability, and compatibility.

A good testing strategy includes both categories, uses clear and measurable requirements, selects appropriate tools, and prioritizes risks that matter to users.

Practice by testing a real application, writing test cases for its main workflows, and defining measurable quality checks. This will help you build a stronger foundation in software testing and QA.

More guides