Articles

What is Functional Testing? Types & Examples

After all, all roads lead to one thing: a ready-to-use system should perform its fundamental function - to operate as expected. Functional testing, which is the most important component of the software testing process, is one of the most important puzzles that provides confidence in system fulfillment and reliability.  

In this article, we will answer the “what is functional testing” question, how this type of testing differs from non-functional testing, and why functional test automation is worth your consideration. Now let's get down to business! 

Functional testing vs. Non-functional testing

Roughly speaking, testing can be divided into functional and non-functional testing. 

What is functional testing?

Functional testing is a type of software testing that checks a software system against functional requirements. In functional testing, you provide the appropriate input, thus checking the output against the functional requirements.

This is a type of testing where we check what the software product performs. For example, testing of a separate system function, database, user interface, etc.

What is non-functional testing?

Unlike functional testing, non-functional testing deals with checking how the system performs. In other words, it is not its capability to perform a given function that is tested, but rather its performance, scalability, UX, etc.

Functional testing vs. Non-functional testing: comparison table

Comparison aspect

Functional testing 

Non-functional testing

Focus

What the product does.

How the product operates.

Goal

To check whether the software functions as intended and meets the defined requirements.

To check non-functional aspects such as performance, security, usability, reliability, etc.

Test cases

Usually created based on app-related functional specifications.

Often built based on performance, security, or usability requirements.

Approach

Black-box and white-box testing methods are commonly used.

Common approaches are performance testing, security testing, and usability testing. 

Sequence

Usually run first, as the focus is on testing functional aspects and ensuring that the system operates as required. 

Usually run after testing functional part of the application (aka after its basic functionality is evaluated). 

Scope

It usually implies a narrower focus specific to particular functions or characteristics.

It usually implies a broader scope covering system-wide characteristics. 

Test automation

It’s recommended to implement functional test automation, especially for repetitive and comprehensive test cases to ensure efficiency and consistency in execution.

Non-functional test automation can also be beneficial. However, it often requires more diverse and complex scenarios, making manual testing with a human approach more reasonable in this case.

Examples

It’s applied to check: 
  • Login page functionality 
  • Search feature 
  • Shopping cart operation, etc. 
It’s applied to check: 
  • System performance 
  • Security 
  • Usability, etc.

Functional testing types

Among functional testing types, the following 8 are commonly recognized.

1. Unit testing

This type of testing verifies individual components or blocks of a software application. They are tested in isolation to ensure that they work properly according to their specific design.

Purpose: Make sure that each unit is free of defects. These units can be functions, methods, or classes in the code.  

Example: You need to test a single function within a module to ensure it produces the expected output based on various input values. For example, it can be a warehouse management system. You need to test a module that adds items to the inventory. In this case, the module to be tested will be an "add to inventory" function that takes as input the name of the item and its quantity and adds it to the warehouse inventory.

2. Component testing (module testing)

Component testing, sometimes called module testing, refers to the testing of individual modules or components of a software application. A module/component in this context implies an independent piece of software, often representing a specific function or feature within a system. Unlike unit testing, component testing extends the scope by testing larger system sections.

Purpose: Assess the correctness and proper functioning of individual program components or modules within the software.

Example: You need to test one component of an e-commerce site. This can be shopping cart functionality, which is a component of the site.  

3. Integration testing

This is a level of software testing in which individual nodes or components of a system are combined and tested as a group.  

Purpose: To test the interaction between components and ensure that the integrated system behaves as expected.  

Example: You need to test an e-commerce site that integrates with a payment gateway to process customer transactions. In this context, integration testing involves verifying that the site can correctly process a customer order by interacting with the payment gateway.

4. System testing

System testing is a stage of software testing where the entire application is tested as a complete and integrated system. It is often referred to as end-to-end testing because it evaluates the functionality and performance of the system in various components to verify their interaction.  

Purpose: Evaluate the entire system to ensure it meets the specified requirements.

Example: You have a CRM system that includes modules for customer data management, lead tracking, email marketing, and reporting. Using system testing, you need to ensure that all CRM functions work effectively together to ensure smooth customer relationship management.  

5. User Acceptance Testing (UAT)

This is usually the final stage of software testing, where end users evaluate the software to ensure that it works as intended, meets their business needs, and can be used effectively in a real-world environment.

Purpose: To validate that the system satisfies business requirements. It is performed by end users.

Example: An end user needs to verify that a CMS allows content authors to create, edit, and publish articles as per the user’s requirements.

6. Functional regression testing

This is a type of software testing aimed at validating that new code changes or software updates do not introduce defects or adversely affect the existing functionality of the application.

Purpose: To ensure that new code changes or feature additions don't negatively impact existing functionalities.

Example: After adding a new feature to an application, you need to test the login functionality to ensure it still works as before. This is what regression testing is all about.

7. Smoke testing

Smoke testing is a “preliminary” testing phase used to assess whether a software build is stable enough for further, more comprehensive testing. It is usually performed immediately after a new build is created but before more extensive testing phases such as regression testing.  

Purpose: To check if the application can perform its most critical functions without critical errors.

Example: After creating a new build for an e-commerce site, you need to perform smoke testing to ensure the system is stable before proceeding with more comprehensive testing.

8. Sanity check

Unlike smoke testing, sanity checking is a narrower and more targeted approach. This focuses on specific (most crucial!) functionality or areas of the software that may be directly affected by recent changes or updates. It is a quick assessment with a limited scope. As with smoke testing, it is performed before full-scale (often regression) testing.

Purpose: To perform a valuable "quick look" at a specific area of an application to ensure that it remains stable and functional after changes to the system have been applied. 

Example: To test a web application with a recent update that was made to the login page. Thus, after fixing a bug related to password recovery, you need to perform a sanity check to ensure this fix hasn't affected the basic login functionality. 

Examples of functional testing

Example 1. E-commerce website   

Let's consider the "Add to cart" function in the context of an e-commerce website. This function not only ensures that the selected item goes to the cart, but also tests the entire process.  

  1. Testing functional components begins by verifying the user's ability to find items, check their details, and initiate the "Add to cart" action.
  2. Once the item is added, the functionality of the shopping cart is tested whether the desired item is displayed with relevant attributes such as name, quantity, and price.
  3. This process covers a variety of scenarios, including adding multiple items, adjusting quantities, and verifying that any promotional discounts have been correctly applied. 

Ultimately, you need to ensure that shoppers can easily and accurately select items and make purchases without any tech-related obstacles. 

Example 2. ERP system 

In the area of enterprise resource planning (ERP) systems, functional testing focuses on core business processes, for example, order management. Testers examine the entire order-to-cash cycle to ensure that the system runs smoothly.  

  1. The process begins with the creation of purchase orders, verifying that the system accurately reflects all order details. It also checks that the product codes, quantities, customer information, price, and applicable discounts are entered correctly.
  2. Functional testing then moves to order fulfillment, where the ERP system is supposed to interact with the inventory management system to ensure that products are available for shipment. Testing includes generating invoices, shipment orders, and verifying that these documents are correctly linked to the original purchase orders.
  3. Further testing includes processing payments, confirming that payments are correctly applied to unpaid invoices, updating the general ledger, and adjusting inventory levels.

Eventually, you need to make sure that the ERP system is working accurately to manage orders, integrate the various components, maintain data integrity, and support error-free enterprise operations.

Example 3. Bank application 

In the area of banking applications, functional testing focuses on core financial transactions. For example, let’s focus on the “Transfer” function.

  1. Testing begins by assessing the user's opportunity to access the funds “Transfer” function.
  2. This is followed by testing the initiation of the transaction: the sender should specify the recipient's account and the amount of the transfer.
  3. The main part of testing involves checking the transfer process: when the system withdraws funds from the sender's account and simultaneously deposits them into the recipient's account, while ensuring data integrity and security. 

The goal is to ensure that these transactions are performed accurately, efficiently, and securely, maintaining the trust and reliability expected in banking. 

Finally: 4 functional testing best practices

1. Requirements agreement 

The foundation of functional testing is predetermined system requirements. Without clear and agreed-upon requirements between all stakeholders, functional testing can be considered pointless. What should be taken into account? 

  • Consider all aspects 

Start by thoroughly analyzing the software requirements documentation. Make sure you understand each requirement, its importance, and its relationship to the functionality of the application.  

  • Traceability matrix (worksheet) 

Create and maintain a traceability matrix. This document links each requirement to one or more test cases. It serves as a roadmap showing which tests verify specific functionality.  

  • Requirement variability  

Keep track of changes to the requirements. When requirements change, test cases should be modified accordingly.   

2. Test data management 

Given that functional testing deals with a diverse range of test data, practicing test data management will help make the process structured and consistent. 

The practice of test data management is aimed at ensuring thorough and accurate software testing by providing different input conditions. What can be taken into account at this stage?

  • Equivalence Class Partitioning (ECP)  

ECP is a black-box software testing technique that helps testers streamline their test cases by grouping sets of similar input data into equivalence classes. These classes represent distinct categories of input data that are expected to produce equivalent results when tested.  

For example, in an e-commerce application, orders may have different statuses (processing, shipping, delivery). Test data should include samples from each class. 

  • Boundary Value Analysis (BVA) 

The concept behind BVA is that errors often occur at the extremes or boundaries of input domains, rather than in the middle of the range. Testers identify the minimum and maximum values, as well as values just above and below these boundaries, and test them rigorously.  

By thoroughly testing these boundary values, testers aim to catch issues related to incorrect data handling. 

3. Regression testing 

Regression testing allows you to make sure that your system is "up to date" and continues to function normally even after an upgrade.  

66-1

In this regard, automation can also be considered one of the functional testing practices. 

4. Automation 

Functional testing often involves a complex and time-consuming process. As mentioned above, automating repetitive test cases will help make testing more time- and resource-efficient.     

65

Ultimately, the decision to automate functional testing should be tailored to the project goals, constraints, and unique requirements of the software development lifecycle.