What is functional testing? Definition, types & examples

Functional testing in software testing - functional testing types and examples Katalon

What is functional testing?

Functional testing is a stage in the software delivery lifecycle (also referred to as a ‘process’) in which quality engineers verify whether the application under test’s features behaves as per their requirements. 

Here are some typical examples of functional testing:

Do appropriate error messages appear when users input the incorrect information (e.g. invalid email address, card number)?

Can users request to change their credentials (e.g. user name, passwords, etc.,...)?

Can users log in with the new credentials? 

Functional vs Non-functional testing

What is non-functional testing?

When performing non-functional testing, testers evaluate other attributes of system behavior, such as the system's performance, reliability, and stability. For example,

  • Can an e-commerce app accommodate a large amount of visitor traffic simultaneously?
  • How long does it take for a page within the application to load?  

What are the differences between functional and non-functional testing?

Functional testing primarily focuses on whether the system delivered the output desired. Non-functional testing validates the “hows” of the AUT’s features, performance, security, scalability, etc. 

 Functional TestingNon-functional testing
MethodNormally performed under the black-box method. In which the testers only validate with inputs and outputs instead of the internal structure of the system.Normally performed under the white-box method. In which the tester is made aware of the system’s internal design to generate test cases accordingly.
Areas of concernWhether or not the system’s outputs satisfy the specification or requirements givenThe system’s performance, stability, security, usability, etc.
InputsBusiness requirements, client’s specificationsSpeed, throughput, scalability, etc.

Unit testing

API testing 

Regression testing (can be both functional and non-functional)

Security testing

Performance testing

Load testing

Stress testing

Types of functional testing and examples

Functional testing is an activity that extends from component-level testing all the way to regression testing of existing features. Here is a list of common functional testing types and examples.

Unit testing

This type of testing is executed by developers as they write code and build the application. The purpose of unit testing is to validate the functionality of a unit or component, making sure the desired outputs are generated given a set of inputs. As the most granular test, it sets up a solid foundation for more complicated, integrated, and comprehensive features.

Example: a restaurant needs an app that helps customers order at their tables without a server. The developer would create a unit test to examine the “add to order” function. Other individual functions such as “remove from order” or “submit order” would also go under unit testing.

Component testing (Module testing)

Component testing is similar to unit testing because they both isolate a single functionality and validate that individually. However, testing for components at this phase might call for stimulative interactions with sample test data, aka stub and driver.

Example: a healthcare service app has a functionality to help patients schedule to meet with medical professionals of their choice. The component to be tested is how the system displays the “nearby” hospitals or healthcare centers using data from the user’s GPS. To test for this function, the user’s profile is the stub and the driver is the available schedules from the health care provider.

Integration testing 

While modules and components can pass individually, quality engineers still need to ensure their functionalities as a group. Since a system’s modules and components are commonly built separately by different developers, integration testing is critical to validate that they work together correctly. 

Modern software infrastructure often includes microservices that communicate with one another. These communications need to be included in integration testing and ensured that they operate properly. 

Example: A banking app has a function where users can set up a saving account. It includes a money-transferring capability from their main account to the saving account. As they are separate modules, testers need to perform integration testing to ensure that the transactions happen smoothly and correctly between the two. 

System testing

As the name suggests, in this phase, the software is tested as a complete, integrated system to verify that all business and functional requirements are met. Hence it is also referred to as end-to-end testing and often occurs right before User Acceptance Testing. 

To yield correct validation, the test environment for system testing needs to be an accurate replication of the production environment. On top of that, it is performed in the white-box testing method, where testers have no involvement in the development of the system. 

Example: a fitness app was created with capabilities such as setting up and tracking monthly fitness goals, consolidating fitness and wellness metrics, building personalized exercise sessions, and smart-watch integration,... Each of these functions will be assessed individually as well as all together in system testing. 

The types of testing above can be distinguished by their level of granularity. For instance, if you are validating a webpage with the login function, this is how the level of granularity progresses:

  • Unit test: validate the independent function of the login button
  • Component test: validate the entire login page independently
  • Integration test: validate the transition between the login page and other pages
  • System test (end-to-end test): function of the entire webpage

Unit, component, integration and system tests are performed in multiple processes within the software testing life cycle, including regression testing, sanity testing, and smoke testing. 

Regression testing

Any new change or feature added to the software can wreck its existing functionalities. Regression testing is performed every time alterations are made to check for the software’s stability and functionalities. Due to its work-intensive nature, regression testing is often automated.

Example: A food delivery app added a function to help users add multiple promotions on top of each other. A regression test needs to be done to make sure the checkout and payment process is not affected.

Sanity testing

Similar to regression testing, sanity testing is conducted for a new build with minor bug fixes, or new code added. If rejected in the sanity testing phase, the build will not proceed to further testing. While regression testing checks the entire system after alterations, sanity testing targets specific areas that are affected by the new code or bug fixes only. 

Example: On an e-commerce webpage, users cannot add a particular product to their cart even when the stock is available. After the issue was fixed, sanity testing is performed to ensure that the “add to cart” function is indeed working. 

Smoke testing 

When a new build is completed, it is handed to the QAs for smoke testing. In this phase, only the most critical and core functionalities are tested to ensure that they yield the intended results. As an early-stage acceptance test, smoke testing adds a verification layer to determine whether or not the new build can proceed to the next stage or needs re-work. 

Example: A utility company built an app with the function to report outages in customers’ homes. This function reports the address and other relevant information as well as notifies the homeowner when a dispatcher is on the way to help. Smoke testing will validate this feature on a fundamental level to assure that when an outage is reported, the correct information is sent so a dispatcher can be there on time. 

How to do Functional Testing?

Functional testing is standardly performed under this order of action.

1. Identify the function to be tested.

Before testing, quality engineers must identify the function they want to test, its requirements, and how it should work. This step is essential for testers to learn the function’s purpose and how users would approach it. Only then can they effectively validate the function or find errors.

2. Create test scenarios

In a test scenario, testers describe an action that the user does and provide the desired outcome. For instance, a test scenario for a movie streaming service can be “test that users can add new movies to their “My favorite” list.” 

3. Prepare test data and determine the correct outputs

Test data is created according to the scenarios and the requirements for the function. Testers will use this data to replicate the real-life usage of the system. Test data can either be input manually or through automation to shorten the time. Within this phase, the desired or acceptable output, as specified by the requirements, is also established. 

4. Run test cases and validate the result against specifications

Depending on the type of test, they can be manually or automatically executed. For repetitive and time-consuming types, such as regression testing, it is best to automate them. After the test cases are performed, their outputs are compared against the requirements. If the output is not as expected, it is considered a defect. 

Why automate functional testing

Software quality assurance is the final step before product release. Therefore, it is vital in terms of revenue and competitive advantage to speed up the process, yet the software quality must not be compromised. As the market constantly demands faster release of more complex software, test automation is the only way to maintain confidence in quality while satisfying the tight release schedule. 

Read more: Automated vs. Manual Testing: When and Why?

Automation can also reduce the costs of errors significantly. Teams who adopt test automation can test earlier, fail faster, and is less likely to discover a bug when it is way too deep into the development process. 

Test automation for functional testing increases productivity, collaboration, and visibility among stakeholders and quality engineers. By leveraging a software quality management platform that auto-generates reports, dashboards, and notifications and integrates with project management tools, all parties involved are informed about the product’s latest status, enabling fast and data-driven decision-making. 

With repetitive and time-consuming test cases automated, quality engineers have more time to develop more insightful test scenarios, thoroughly test the product inside-out, and examine the product under edge cases and exploratory testing

Choosing the right tool for functional testing automation

Functional testing plays a crucial role and is tied to many other activities in the software development life cycle. However, teams usually use a number of fragmented tools that solve separate testing needs, which creates a collection of complex, brittle, and hard-to-scale tool-stack for quality management.

In the long term, as products and teams scale, this approach will be the biggest hindrance to continuous growth and shortened time-to-market. The solution is a software quality management platform that assists in all testing activities, from planning, and testing to reporting and releasing. 

The Katalon Platform is an innovative and comprehensive end-to-end software quality management system that enhances collaboration, and management, helps teams scale, and continuously improves functional testing. 

Do your team need a better platform for functional testing? Claim your 30-day free trial now with the Katalon Platform.


Activate Katalon Free Trial