Testing is critical to every business function, but testing is a huge umbrella. One needs to understand the different types of testing available and then decide what is best suited for their application. One of the broadest classifications of testing is functional and non-functional testing. In this section, we will discuss more of these two types of testing and how they are different from one another.
Context of the blog
- What is Functional Testing?
- What is non-functional testing?
- Functional testing strategies
- Types of Functional Testing
- Functional testing strategies
- Conclusion
1. what is functional testing?
Just as the name suggests, functional testing is done to verify the functionality of the Application Under Test (AUT). At the beginning of any software project, there is a stakeholder meeting to discuss the requirements of the application. These requirements are discussed, brainstormed, documented, and then signed off. This document then serves as a guideline for application development.
The main aim of any functional testing is to ensure, everything documented in the specifications document is implemented as expected. Quality in terms of functional testing is getting the expected result after every transaction. The accuracy of the result or output is the checkpoint for every functional test case. A detailed functional testing plan is driven by a testing matrix wherein each requirement is mapped to one or more functional test cases and verification points.
2. What is non-functional testing?
Non-functional testing concentrates on the aspects of testing that are not directly related to the functionality of the application. Some of the most points that are tested under non-functional testing are the usability of the application, the ease of navigation, time is taken to move between screens or pages, the performance of the application under load or stress.
Many people make the mistake of ignoring non-functional requirements, this can sometimes lead to the failure of the application or product as well. Instead, they should make it a point to capture and document these requirements as well. These are popularly known as the NFR’s (Non-Functional Requirements). Both functional and non-functional requirements are equally important and need to be thoroughly tested for the success of the application.
3. Types of Functional Testing
White Box Testing: Includes testing the internal structure of the system code
Black Box Testing: Based on the test objective, derive test cases
Unit Testing: Identify bugs and errors right from the start of the development life cycle.
Smoke Testing and Sanity Testing: Compare the system with specifications to make sure it’s functioning accordingly
Integration Testing: Test individual software components to verify the interaction between various interfaces
Non-Functional Testing Involves Following Sub-Types of Testing’:
Compatibility Testing: Performed to ensure compatibility of a system, application, or website
Configuration Testing: Testing an application with multiple combinations of software and hardware to find out the optimal configurations
Load Testing: Determine a system’s behavior under both normal and anticipated peak load conditions.
Performance Testing: Evaluating the quality or capability of a product.
Recovery Testing: Determine how quickly the system can recover after it has gone through a system crash or hardware failure
Security Testing: Determine if an information system protects data and maintains functionality
Scalability Testing: Measure its capability to scale up or scale out in terms of any of its non-functional capability.
Stress Testing: Stretches software to its limits and checks its durability.
4. Functional Testing Strategies
For functional testing, the test strategies are attained using automated and manual tools. The widely used functional testing method includes black-box testing, where the tester isn’t required to test the internal source code, but validates the system using valid and invalid inputs.
All functional tests like, API testing, unit testing, Boundary value analysis, etc., have a specific output that has an expected output. After entering valid data, the system should work as intended. Functional tests are scripted with pass and fail criteria.
The tests conducted under this require more creativity and technical expertise compared to the functional ones. This is because you are developing a product keeping the end-user workflow in mind, rather than what input gives what output.
While some non-functional tests can be defined through fail and pass criteria, many tests are more objective and require the opinion of the testing team.
Therefore non-functional tests are written in measurable and quantifiable ways wherever needed. Having good communication and requirement gathering from the client is essential when you perform testing.
5. Difference Between Functional and non-functional Testing
S No. | Criterion | Functional Testing | Non Functional Testing |
1 | What is tested? | The functionality of the application is tested by verifying each of the functional requirements as documented in the SRS (Software Requirement Specification) | The NFR or the Non-Functional Requirements are tested here with more weightage on usability and ease of use for the customers. |
2 | How is it performed? | It can be done both manually and using automation tools | In most cases, we need a tool to simulate the scenarios for this type of testing |
3 | What is validated? | The functionality of the application is verified against the set guidelines | The performance of the application is validated under different situations. |
4 | Example | On the login screen, once the user enters his username and password, he should be able to successfully navigate to the next screen in the application | On the login screen, once the user enters his username and password, he should be able to successfully navigate to the next screen in the application within “X” seconds. This “X” should be documented in the NFR document. So, if X is 6 sec, the user being able to log in at the 7th second would be considered as a failure. |
5 | Sequence | Once the application development is completed, the functional testing can be module by module or even with respect to functionalities. | It is normally done after the functional testing is completed for the entire application. It can be done along with the integration testing also. |
6 | Types of testing | 1. Unit Testing 2. Smoke Testing 3. Regression Testing 4. Integration Testing 5. User Acceptance Testing |
1. Load Testing 2. Performance Testing 3. User Experience Testing 4. Stress Testing 5. Disaster Recovery Testing |
7 | Usage | It is done to validate the application and how it behaves | It is done to validate the performance of the application under different sets of conditions and scenarios |
8 | Source of the requirements | The functional requirements are provided by the app owners and signed off before the start of the development activity | Voice of Customer and the surveys related to how similar applications perform in the market are taken as the ballpark measure for the non-functional requirements |
9 | Ease of defining checkpoints | Functional testing checkpoints are easy to define. For example, if you have a login screen, you enter the correct credentials and hit the login button, it should take you to the next page. | The NFR checkpoints are difficult to describe. For example, in different instances login may take 4 sec, 6 sec, 8 sec, or 10 sec. It is difficult to decide which is the failure case in this. |
10 | Ease of execution | Functional tests are very straightforward and easy to execute. If there are well-defined test cases available, then in most cases even a non-tester would be able to perform the functional testing by following the test case document | Running the non-functional tests needs a deep understanding of the scenarios and how to set them up. It requires special skills and cannot be performed by non-testers |
6. Conclusion
Both functional and non-functional testing is very important for rolling out a quality product or application to the market. It is the responsibility of the stakeholders to ensure both these types of testing are done exhaustively before the product or application reaches the customers.
The success of the application or software product is directly related to its quality. And the best quality can be achieved only by conducting both functional and non-functional testing.