Blog / API Testing

Overview of functional testing

Functional testing helps software teams validate the correctness of the software functionalities they build, extend and maintain. Thanks to automated functional testing, software teams can release software to production without fear of breaking software features. This article will go through different aspects of functional testing and how you can leverage this fantastic method of automated software testing to test your software.

Written byMatt
Published OnSat Aug 07 2021
Last UpdatedSat Aug 07 2021

Functional testing helps software teams validate the correctness of the software functionalities they build, extend and maintain. Thanks to the automated functional testing, software teams can release software to production without fear of breaking software features.

This article will go through different aspects of functional testing and how you can leverage this fantastic method of automated software testing to test your software, including different types of API.

Table of Contents

What is functional testing

Functional testing is a form of software testing (either manually or automated) and a variation of black-box testing. In black-box testing, the tester is not aware of the internals of the software under test.

The focus of functional testing is to verify the correctness of different software functionalities.

To validate the correctness of functionalities, QA teams consult product requirements and specification documents. The word functional does not mean that you are testing a function (method, procedure) of your module, package, or class in a programming language.

How to do functional testing

Testing how software functions under unhappy paths are as crucial as happy paths, and you must include unhappy paths in your functional testing.

What is non-functional testing

The functional aspect of the software is not the only area that requires software testing. For example, QA & software teams test the availability of an API under the expected load to make sure the API can handle the workload. As the name suggests, non-functional testing focuses on how the software operates rather than the system’s behavior. Examples of non-functional API testing are Loading testing, performance testing, security testing, recovery testing, stress testing, and volume testing.

Functional testing vs. non-functional testing

Functional and non-functional testings cover two equally important aspects of the software under test and complete each other. The table below lists the difference between functional testing and non-functional testing.

Functional testingNon-functional testing
Tests software’s functionalities against the requirementsTests non-functional aspects, including performance, reliability, and security.
Functional testing can be done manually or by automationManual non-functional testing is not feasible
Answers “Would the software work as expected with this change?” questionAnswers “Would the software work as good as before?” question
Uses product requirement & specification documents as the source of truthUses desired performance and availability metrics as the input

Functional API testing example

In this part, we will go through one functionality available in almost any web API: user authentication, and token generation. Most APIs offer an endpoint (or a GraphQL query field, in GraphQL APIs) for authentication, a functionality that we should include in our API testing effort. I would break this functionality into two parts:

A functional test with two steps would be able to verify the mentioned expectation. Using your tool/framework of choice for functional testing:

Our top 10 API testing mistakes article cover some of the most common mistakes in API testing.

Benefits of automated functional testing

On the surface, automating your functional tests gives you the agility you have always wanted to test & release your software. That said, speed is not the only benefit of automated functional testing.

Testfully benefits for API functional testing

Testfully was build from the ground up for API functional testing. Unlike many other available API testing tools, Testfully allows you to define both single and multi-step functional tests. Moreover, Testfully offers the following unique features for functional API testing:

Demo: Functional API testing using Testfully

The below short video gives you a quick demo of Testfully’s functional API testing and monitoring features, including functional test creation, running tests in parallel, and scheduling test cases for API monitoring.

FAQ

What’s the difference between functional & non-functional testing?

While functional testing is focused on software’s functionalities, non-functional testing is concerned about other aspects of software like security and performance.

Which one is more important? Functional or non-functional testing?

Functional and non-functional testing are both equally important, and you should try to exercise both practices. With that said, if you have resources to allocate to only one, we highly recommend focusing on functional testing as it delivers more value to you.

Can I use Postman for functional API testing?

Although you can use Postman for functional API testing, you will be very limited as Postman does not support multi-step tests that you will most probably need for functional testing. Testfully makes a great Postman alternative for functional testing & monitoring.

What is a happy path in software testing?

A happy path happens when the user takes the actions you expect them to take, and nothing goes wrong in between; that’s a happy path.

What is an unhappy path in software testing?

An unhappy path happens when the user takes actions you don’t expect them to take. For example, in an authentication scenario, a user may enter an invalid email address, and that’s a user entering an unhappy path.

Testfully is a bootstrapped startup from Sydney, Australia.
We're funded by our supportive & amazing customers.

The word `testfully` is a registered trademark of Testfully Pty Ltd.