Reading Time: 8 mins

Functional Testing and Non-Functional Testing: All that you need to know

What is functional testing?

Today we use hundreds, if not thousands, of software applications without giving it a second thought. Everything we use, right from the fridge we use, the TV sets we watch, the cars we drive, home security systems we rely on, the flights we catch, our online shopping sprees… and of course our computers and mobile phones—we take all these things for granted. We expect them to behave exactly as we expect, every time!

Ever wondered how such perfection is achieved? The answer to that is what we call Functional Testing.

Functional Testing makes sure that all the applications that drive all the goodies that we use work exactly as they are supposed to. It is usually a form of Black Box Testing, because generally the testers do not really get into the internal program structure, or how the applications work. They only look at what goes in and what comes out—input and output.

With this vast ocean of Functional Testing that evaluates millions of apps every day, there are various specific types of testing that are designed to meet very specific requirements.

Unit Testing

The most fundamental form of Functional Testing is Unit Testing. It evaluates the most basic elements or components of a software program—the smallest chunks of code that can be tested. Hence the name, Unit Testing. Each unit can be a module, function, method, or subroutine that takes a certain input and gives out a certain output. Test cases for Unit Testing evaluate fundamental aspects such as line, code, and method coverage. These refer to which lines or how much code or what methods were executed or “covered” during the test.

Smoke Testing

Smoke Testing gets its name from an ancient practice of passing smoke in plumbing lines to detect cracks. In a software context, Smoke Tests are designed to detect whether or not the code breaks, or fails, and under what circumstances. It is generally done after a new version, or after some updates, to check if the new builds are stable.

Sanity Testing

Sanity Testing is a form of testing to ensure that all the critical/important functionalities of the application are functioning correctly.

Regression Testing

This form of testing is done after adding new code or making bug fixes to ensure that the existing functionalities are not affected. If they are, then the system is said to have “regressed” or fallen back to an lower level of functionality, hence the name Regression Testing.

Integration Testing

Integration Testing is done when two, or generally more than two, modules or components are integrated together to develop an application. While the individual modules or components may function correctly on their own, Integration Testing ensures that the work together just as well.

User Acceptance Testing

Also known as Beta Testing, User Acceptance Testing (UAT) is a form of testing in which the application is tested by a small group of actual users or experts, representative of the actual end-users, in real-life situations. UAT provides valuable feedback to developers on whether or not the functionalities they create really meets users’ needs and to what extent, what gaps or drawbacks they face, and what extra features they need to add to the application.

Localization & Globalization Testing

These types of testing are two sides of the same coin. In Localization Testing, the functionalities are checked to ascertain whether they are suitable for very specific local cultures whereas, in Globalization Testing, they are checked to ascertain whether the application is suitable across all cultures globally.

System Testing

In terms of hierarchy, System Testing generally follows Integration and precedes Beta Testing or UAT. In System Testing, the entire, fully integrated system is tested from end to end.

If we take an analogy of a car, then Unit Testing will check every nut and bolt, wheels, windows etc. In Integration Testing, the wheels are joined with the axle and chassis and then tested. In System Testing, the whole car is ready and tested. In UAT or Beta Testing, the user takes the car for a test drive.

What is non-functional testing?

Non-functional testing

While Functional Testing takes care of the way the programs are executed in an application, Non-Functional Testing looks at how the application performs in a live environment. This type of testing takes into consideration aspects such as Speed, Reliability, Scalability, Performance, and Usability.

Thus, Non-Functional Testing is equally critical when it comes to meeting end-users’ requirements because not only do applications need to “function” but they also need to “perform.”

This takes into account factors such as performance under high loads, e.g., when thousands or even millions of users concurrently log into a system. It also considers the ability of the application to handle various forms of stress, environments, disasters, and so on.

The most common forms of Non-Functional Testing include:

Load Testing

Load Testing validates that the application responds as required even when a huge number of concurrent users access it simultaneously, such as in real-life situations. It is usually performed on dedicated servers that simulate actual usage environments.

Stress Testing

Stress Testing evaluates the performance of applications in crunch situations, e.g., under low memory/hard disk space conditions. In such environments, it is possible to detect defects that would not have been discovered in normal situations.

Recovery Testing

This checks whether applications recover gracefully when inputs are not as expected or when the environment fails. For instance, when a user types an invalid input that causes a database process to abort, or when systems shut down abnormally due to a power failure, and so on.

Security Testing

This simply checks whether an application has no flaws or vulnerabilities that can be exploited to compromise the system and lead to loss of data or theft. It focuses on testing authentication, access control, authorization, and other such sensitive processes.

Scalability Testing

Scalability Testing checks whether the application can handle an increase in user traffic, number of transactions, processes, or volume of data. The application needs to scale up to meet such increases in demands.

Endurance Testing

Endurance Testing, also known as Soak Testing, checks whether the application can bear a sustained load over a long duration of time. Typically it is used to test for memory leaks in a system.

Reliability Testing

This form of testing can be used to check whether an application delivers the same output consistently over a specified duration. Reliability Testing is extremely vital in mission-critical applications such as aircraft systems, nuclear plant processes, and medical equipment, among others.

Baseline Testing

Baseline or Benchmark Testing refers to setting a standard for any new application under test. For instance, an application may be able to handle a load of 100,000 users in its first round of testing, which then becomes a benchmark for future testing.

What is the difference between Functional and Non-Functional Testing?

Functional Testing looks at the behaviour of an application, whereas Non-functional Testing looks at its performance. To make an analogy, if you think of an application as a child, then Functional Testing evaluates its manners whereas Non-functional Testing evaluates its grades in exams.

Some of the key differences in Functional and Non-Functional Testing are:

  • Functional Testing evaluates “what” whereas Non-Functional Testing specifies “how” an application is to be tested.
  • Functional Testing is done based on end-user requirements whereas Non-Functional Testing is generally specified by the development team.
  • Functional Testing is invariably conducted before the system goes into the market but Non-Functional Testing can be done even after go-live.
  • The scope of Functional Testing is defined by the product specifications whereas the scope of Non-Functional Testing depends on the system architecture.
  • Functional Testing covers the technical functionalities but Non-Functional Testing includes Performance, Reliability, Security, Scalability, and Usability.

Summary

Functional and Non-Functional Testing are two pillars of the testing family. Both are equally critical when it comes to meeting the end-users’ requirements. While Functional Testing looks at all the behavioural aspects of the application, Non-Functional Testing ensures the correct performance in a range of usage conditions.

Janaha V

Brand Evangelist