Functional Testing
Overview
Functional testing is a type of software testing that validates the software system against the functional requirements/specifications. The purpose of functional tests is to test each function of the software application by providing appropriate input, verifying the output and comparing the actual results with the expected results. Functional testing involves checking of User Interface, APIs, Database, security, client/ server applications and functionality of the application under test.
Types of Functional Testing
Functional testing can be categorized into several types, each of which focuses on different aspects of a software's functionality.
Unit Testing
Unit testing is the first level of functional testing. It is performed to validate each individual unit of the software application during the development phase. A unit is the smallest testable part of software like functions, classes, procedures, interfaces.
Integration Testing
Integration testing is the second level of functional testing. It is performed to check the interaction between the integrated modules of the software application. It is mainly categorized into two types: Top-down approach and Bottom-up approach.
System Testing
System testing is the third level of functional testing. It is performed to validate the complete and fully integrated software product. The purpose of system testing is to evaluate the system’s compliance with the specified requirements.
Regression Testing
Regression testing is performed to confirm that a recent program or code change has not adversely affected existing features. It ensures that the old code still works once the new code changes are done.
Acceptance Testing
Acceptance testing is the last level of functional testing. It is performed to verify whether the system has met the requirement specifications or not. It is done at the time of system handover to the user or customer.
Functional Testing Process
The functional testing process follows a series of steps to ensure the software product meets the specified requirements.
Identification of functions
The first step in functional testing is to identify the functions that the software is expected to perform. This could be anything from a simple task such as logging in, to more complex operations like data processing.
Creation of input data
Based on the identified functions, the next step is to create input data that is in line with the specifications of the identified functions. This data is used to test the functionality of the software.
Determination of output
The expected output of the functions is determined based on the functional specifications. This output is what the system should produce when it is functioning correctly.
Execution of test case
The test case is executed by inputting the data into the system. The actual output is then observed and recorded.
Test case results
The actual output and the expected output are compared. If the actual output matches the expected output, the test case is considered to have passed. If not, the test case is considered to have failed.
Techniques of Functional Testing
Functional testing can be performed using various techniques. These techniques can be broadly categorized into two types: Black Box Testing and White Box Testing.
Black Box Testing
Black Box Testing is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester. These tests can be functional or non-functional, though usually functional.
White Box Testing
White Box Testing is a software testing method in which the internal structure/design/implementation of the item being tested is known to the tester. It is also known as Clear Box Testing, Open Box Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing or Structural Testing.
Tools for Functional Testing
There are several tools available that can assist with functional testing. Some of these tools include:
- Selenium: An open-source tool that is used for automating the tests carried out on web browsers.
- TestComplete: A functional automated testing platform developed by SmartBear Software.
- Unified Functional Testing (UFT): An automated functional testing tool that makes use of visual basic scripting to automate the user actions on a web or client based computer application.
- Rational Functional Tester: An object-oriented automated functional testing tool that can perform automated functional, regression, GUI testing and data-driven testing.
Advantages and Disadvantages of Functional Testing
Like any testing method, functional testing has its advantages and disadvantages.
Advantages
- Functional testing provides a systematic approach for testing the functions of a software application.
- It helps in ensuring the quality of the software product.
- It can be done by manual testing, automation testing or both.
- It helps to uncover functional defects in the early stage of development.
Disadvantages
- Functional testing cannot be used to test non-functional aspects such as performance and usability of the software application.
- It may not catch all the defects in a software product due to the limited scope of the tests.
- It requires a significant amount of time and resources to carry out.