> For the complete documentation index, see [llms.txt](https://qatesting.gitbook.io/qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qatesting.gitbook.io/qa/manual-testing/types/black-box-testing/functional-testing.md).

# Functional Testing

## What is Functional Testing?&#x20;

Functional testing refers to testing software to <mark style="background-color:yellow;">**verify that it performs according to defined functional requirements and specifications.**</mark> In simple terms, it tests the functionality or features of an application to ensure they work as intended.

<div data-full-width="true"><figure><img src="https://media3.giphy.com/media/3UmMAw4cxGx3tY8fbO/200w.gif?cid=790b7611jpotbcl40c5lexd1yzzs015vdcyg8peuxm1t12gm&#x26;ep=v1_gifs_search&#x26;rid=200w.gif&#x26;ct=g" alt=""><figcaption></figcaption></figure></div>

Functional testing aims to answer two basic questions:

> ***" Does the software do what it is supposed to do?"***
>
> ***" Does the software meet the business and user requirements defined for it?"***

{% hint style="info" %}
Functional test cases are designed based on the specified functional requirements of an application. The test cases are then executed to verify that the software performs as documented.
{% endhint %}

## Example of Functional Testing

Let's say you have an e-commerce website with the following requirements:

• The checkout page should allow customers to enter their shipping address details.

• After entering an address, the system should calculate applicable taxes and display the total amount due.

• The system should allow customers to apply valid promotional codes and adjust the total as needed.

### Test cases for these requirements could be

• Enter a valid shipping address and verify taxes are calculated correctly.&#x20;

• Enter an invalid address and ensure an error message is displayed.

• Apply a valid promotional code and verify the total amount decreases by the specified amount.&#x20;

• Apply an invalid code and ensure an error message is shown.

{% hint style="success" %}
The objective of these test cases is to verify that the checkout functionality performs as specified in the requirements.
{% endhint %}

## Importance of Functional Testing

Functional testing helps ensure that the developed software meets design specifications and performs as expected. It <mark style="background-color:blue;">**exposes defects early in the development lifecycle, reducing rework costs and helping produce higher quality software.**</mark>

## Good functional test cases should cover

• **Normal flows** - Test valid, expected inputs and functionality&#x20;

• **Edge cases** - Test invalid inputs and boundary conditions&#x20;

• **Error handling** - Verify exceptions and error messages

**• Performance** - Test performance under load

## What are the advantages of Functional Testing?

* It produces a defect-free product.
* It ensures that the customer is satisfied.
* It ensures that all requirements met.
* It ensures the proper working of all the functionality of an application/software/product.
* It ensures that the software/ product work as expected.
* It ensures security and safety.
* It improves the quality of the product.

Example: Here, we are giving an example of banking software. In a bank when money transferred from bank A to bank B. And the bank B does not receive the correct amount, the fee is applied, or the money not converted into the correct currency, or incorrect transfer or bank A does not receive statement advice from bank B that the payment has received. These issues are critical and can be avoided by proper functional testing.

## What are the disadvantages of Functional Testing?

* Functional testing can miss a critical and logical error in the system.
* This testing is not a guarantee of the software to go live.
* The possibility of conducting redundant testing is high in functional testing.
