0% found this document useful (0 votes)
32 views4 pages

Unit Testing: Functional Overview

Uploaded by

Ankit Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views4 pages

Unit Testing: Functional Overview

Uploaded by

Ankit Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Functional and Non Functional Testing is what?

Functional testing is performed using the functional specifications provided by the client
or you can say by using the design specifications like use cases provided by the design
team.

In this, tester has to test the application to see that all requirements of the client which
he has said in SRS and BRS have been incorporated or not.
Non Functional Testing is that which is always concerned with the client expectations
like performance, load and stress issues and so on.
Distinction between Functional and Non Functional Testing

Functional Testing Non- Functional Testing


1. In functional Testing tester tests how 1. In Non-Functional Testing tester tests
well the system performs. how well the system responds.
2. Functional Testing is based on client 2. Non- Functional Testing is based on
requirements. client expectations.
3. Functional Testing means Testing the 3. Non- Functional Testing means Testing
application against business the application against clients and
requirements. performance requirements.
4. It is a part of System Testing. 4. It is also a part of System Testing
5. Functional Testing Validating the 5. Non- Functional Testing Validating the
behavior of application. performance of application.
6. This Testing covers Unit Testing, 6. This Testing covers Load/Performance
Integration Testing, Smoke Testing, Testing, Stress/Volume Testing, Security
Sanity Testing, Regression Testing and Testing, Installation Testing and so on.
so on.
7. It is always concentrating on customer 7. It is always concentrating on customer
requirements. expectations.
8. Functional Testing means how is your 8. Non- Functional Testing means how
system is doing. well your system is doing example
usability, performance and stress testing.
Difference between Black Box Testing and White Box Testing
Black Box Testing White Box Testing

1 In this testing knowledge of In this form of testing knowledge of


programming is not necessarily programming is must means it is
essential. essential.

2 Normally independent software Normally software developers are


testers are responsible for doing responsible for doing White Box Testing.
Black Box Testing.

3 In this form of testing Knowledge of In this form of testing Implementation


implementation is not required. knowledge is required.

4 In Black Box Testing, testers may or Normally software developers are


may not be technically sound. involved in this testing, but if it is
performed by software testers, then
testers should be technically sound.

5 In this sort of testing testers mainly In this sort of testing developers mainly
focuses on the functionality of the focuses on the structure means
system. program/code of the system.

6 This testing is done by testers. This testing is mostly done by


developers.

7 This type of testing always focuses This type of testing always focuses on
on what is performing/ carried out. how it is performing/ carried out.

8 In Black Box Testing no knowledge In White Box Testing knowledge


regarding internal logic of code is regarding internal logic of code is needed
needed means no need of means need of programming is
programming is necessary. mandatory.

9 Other names of this testing include Other names of this testing include
means synonyms of black box means synonyms of white box
testing are testing regarding testing are testing regarding code
functionality means Functional means Structural testing, Glass-box/
testing, Behavioral testing, and Clear-box testing, Open-box testing/
Opaque-box/ Closed-box testing Transparent-box testing, Logic-driven
that is the reason why in this testing and Path-oriented testing that is
testing no knowledge of the reason why in this testing knowledge
programming is needed. of programming is needed.

10 Black box testing means functional White box testing means structural test
test or external test. or interior test.

Types of functional testing and examples

Functional testing is an activity that extends from component-level testing all the way to regression
testing of existing features. Here is a list of common functional testing types and examples.

Unit testing
This type of testing is executed by developers as they write code and build the application. The
purpose of unit testing is to validate the functionality of a unit or component, making sure the
desired outputs are generated given a set of inputs. As the most granular test, it sets up a solid
foundation for more complicated, integrated, and comprehensive features.

Example: a restaurant needs an app that helps customers order at their tables without a server. The
developer would create a unit test to examine the “add to order” function. Other individual functions
such as “remove from order” or “submit order” would also go under unit testing.

Component testing (Module testing)

Component testing is similar to unit testing because they both isolate a single functionality and
validate that individually. However, testing for components at this phase might call for stimulative
interactions with sample test data, aka stub and driver.

Example: a healthcare service app has a functionality to help patients schedule to meet with medical
professionals of their choice. The component to be tested is how the system displays the “nearby”
hospitals or healthcare centers using data from the user’s GPS. To test for this function, the user’s
profile is the stub and the driver is the available schedules from the health care provider.

Integration testing

While modules and components can pass individually, quality engineers still need to ensure their
functionalities as a group. Since a system’s modules and components are commonly built separately
by different developers, integration testing is critical to validate that they work together correctly.

Modern software infrastructure often includes microservices that communicate with one another.
These communications need to be included in integration testing and ensured that they operate
properly.

Example: A banking app has a function where users can set up a saving account. It includes a money-
transferring capability from their main account to the saving account. As they are separate modules,
testers need to perform integration testing to ensure that the transactions happen smoothly and
correctly between the two.

System testing

As the name suggests, in this phase, the software is tested as a complete, integrated system to verify
that all business and functional requirements are met. Hence it is also referred to as end-to-end
testing and often occurs right before User Acceptance Testing.
To yield correct validation, the test environment for system testing needs to be an accurate
replication of the production environment. On top of that, it is performed in the white-box testing
method, where testers have no involvement in the development of the system.

Example: a fitness app was created with capabilities such as setting up and tracking monthly fitness
goals, consolidating fitness and wellness metrics, building personalized exercise sessions, and smart-
watch integration,... Each of these functions will be assessed individually as well as all together in
system testing.

The types of testing above can be distinguished by their level of granularity. For instance, if you are
validating a webpage with the login function, this is how the level of granularity progresses:

Unit test: validate the independent function of the login button

Component test: validate the entire login page independently

Integration test: validate the transition between the login page and other pages

System test (end-to-end test): function of the entire webpage

Unit, component, integration and system tests are performed in multiple processes within the
software testing life cycle, including regression testing, sanity testing, and smoke testing.

Regression testing

Common questions

Powered by AI

Component testing is necessary when a specific part of the system needs to be validated independently, particularly for functionalities involving interactions with other code elements or data sources. Unlike unit testing, which tests the most granular pieces of code, component testing may involve stimulative interactions with test data and requires testing stub components or drivers to validate intricate behaviors potentially involving multiple units. An example includes testing the display function of "nearby" healthcare centers in an app using GPS data .

Integration testing focuses on verifying that different modules or components of a system work together as expected, especially ensuring proper communication and interaction between them. This is crucial when different developers build separate parts of the system. System testing, in contrast, assesses the entire integrated application as a complete system to ensure all business and functional requirements are met, simulating the production environment as closely as possible. While integration testing examines the interactions between parts, system testing evaluates the whole system's end-to-end functionality .

Unit testing is a cornerstone of functional testing, where developers validate individual components or units of code to ensure they produce the correct outputs given specific inputs. It is the most granular form of testing and provides a solid foundation for further integration and system testing. By addressing potential issues in the smallest units of code early in the software development cycle, unit testing helps streamline more complex testing stages and enhances overall software reliability .

Black-box testing provides the advantage of validating a system's functionality from an end-user perspective, focusing on user input and expected outputs without needing programming knowledge, which is ideal for ensuring business requirements are met. However, its limitations include a lack of insight into the internal code logic, which can lead to missed defect detection related to code structure and implementation errors. This testing relies heavily on specified requirements and may not uncover deeper issues within the application's code architecture .

Non-functional testing addresses concerns related to performance, security, usability, and reliability, ensuring the system's operation aligns with client expectations such as speed, responsiveness, and overall user experience. These aspects focus on how well the system performs under certain conditions, including stress and load scenarios, rather than specific operational tasks requested by the client, highlighting user satisfaction and expectation management .

Functional testing focuses on validating the application's behavior against business requirements, ensuring all specified client needs in the SRS and BRS have been met. It includes activities like unit, integration, and regression testing, and verifies the system's functionality. On the other hand, non-functional testing assesses the system's performance, including aspects like load, stress, and usability, in alignment with client expectations rather than specific requirements .

Regression testing ensures that changes, enhancements, or bug fixes do not adversely affect the existing functionalities of a software application. It interacts with other types like unit, integration, and system testing by validating that recently modified code still meets both old and new requirements without introducing unintended errors. Regression testing is crucial because it maintains software integrity across updates and is often automated to efficiently cover all affected areas by recent changes within the whole testing lifecycle .

Examples of non-functional testing include load/performance testing, stress/volume testing, security testing, and installation testing. These tests are critical because they ensure the software system can handle expected and unexpected workloads, protect against vulnerabilities, and perform well in various environments. Non-functional testing focuses on the system's performance and user experience, aligning with client expectations rather than specific functional requirements .

White-box testing requires knowledge of programming and is normally performed by developers because it focuses on the code's internal logic. In contrast, black-box testing does not require programming knowledge and is typically performed by independent software testers, focusing on the system's functionality without consideration of its internal processes .

System testing considers the software as a complete unit and involves end-to-end testing to verify the full spectrum of business and functional requirements, using inputs that mimic real-world scenarios. Unlike unit or integration testing—which isolate specific components or interactions of the system—system testing evaluates the entire implementation as a single entity, typically in an environment replicating production settings, and without involvement in the code development, unlike white-box testing .

You might also like