Lesson 4
Lesson 4
paramtech.com.tr
©2024. Tüm hakları saklıdır.
Functional testing
The primary goal of functional testing is to ensure that the software performs the functions
it was assigned to do, and typically does not concern itself with the internal code structure
or implementation details. It is one of the most common and foundational types of testing.
Functional testing
Examples of Functional Testing
Imagine you are testing a web application that requires users to log in. In this case, functional testing
What are the “expected” features from a Login page then? Several that come to mind are:
1. User Authentication
2. Account Lockout
3. Password Reset
4. Remember Me
5. Account Recovery
6. Multi-Factor Authentication (especially critical for high-risk applications)
7. Session Management (ensure that users are logged out automatically after a period of inactivity for
security purposes)
8. User Monitoring
Functional testing
Generally, the more emphasis placed on security, the more functional testing needs to be done for the
Login feature. Here are several examples of functional test cases on the Login page:
1. Test that users can successfully log in with valid credentials (e.g., a registered username/email and
password).
2. Test that users receive an error message when attempting to log in with invalid credentials (e.g.,
incorrect password or non-existent username).
3. Test that after a specified number of consecutive failed login attempts, the account is locked and the
user cannot log in.
4. Test the password reset feature by initiating a password reset request through the "Forgot Password"
link.
5. Test the "Remember Me" feature to ensure that the user remains logged in across browser sessions.
6. Test the implementation of MFA by logging in with valid credentials and verifying that the MFA method
(e.g., SMS code, app-based token) works correctly.
Functional testing
Positive Login Page Test Cases
Positive test cases are test cases that follow the “happy path” i.e. testing if the Login page functions as expected under valid inputs. These test
cases explore scenarios where users do what they are supposed to do, such as:
1. Valid username and password combination successfully logs the user in.
2. Testing with the minimum allowed username and password length.
3. Testing with a username and password containing alphanumeric characters.
4. Successful login with the "Remember Me" option selected.
5. Testing login with a username that contains both uppercase and lowercase characters.
6. Successful login using a valid email address as the username.
7. Successful login using a valid phone number as the username.
8. Successful login with multi-factor authentication (MFA) enabled.
9. Testing login with a username that includes special characters (e.g., @, #, $).
10. Successful login using social media accounts (if applicable).
11. Successful login using biometric authentication (e.g., fingerprint, face recognition).
12. Testing login after a password reset to ensure the new password works.
13. Successful login after an account recovery process.
Functional testing
2. Negative Login Page Test Cases
In contrast, negative testing for the Login page aims to explore scenarios that deviate from that “happy path”. Users don’t always do
what we want them to do. Sometimes they do unexpected things, and a good tester understands that unpredictability to test
accordingly. Some common negative test cases you should test on your Login page include:
testing type your team performs. Non-functional testing is the much needed counterpart.
Non-Functional testing
When doing functional testing, testers try to answer the question Can the system do what it was built to
do?
When doing non-functional testing, testers try to answer the question Can the system do what it was
built to do well enough?
Non-Functional testing
Here are 5 non-functional test cases for you to better understand the concept:
1. Measure the response time of the system under normal load conditions.
2. Simulate concurrent user connections to determine how the system performs under heavy load,
checking for response time degradation or failures.
3. Conduct usability testing with actual users to gather feedback on navigation, intuitiveness, and
overall user experience.
4. Assess the system's ability to handle an increased workload by gradually increasing the load and
observing performance metrics like CPU and memory usage.
5. Test user roles and permissions to ensure that users can only access the features and data they
are authorized for.
What are the differences between functional testing and non-functional
testing?
Functional testing primarily focuses on whether the system delivered the output
desired.
Purpose To verify if the software functions as intended and meets To evaluate non-functional attributes like performance, security, usability,
functional requirements. and more.
Focus Tests what the software should do. Tests how well the software performs certain functions or behaves under
specific conditions.
Scope Typically focuses on specific features or functionalities. Covers a broader range of attributes beyond functionality.
Examples of Testing Unit Testing, Integration Testing, System Testing, User Performance Testing, Security Testing, Usability Testing, Compatibility
Types
Acceptance Testing. Testing.
Test Criteria Pass/fail criteria are often straightforward based on Pass/fail criteria may involve thresholds or benchmarks (e.g., response
expected outcomes. time should be below 2 seconds).
User Focus Ensures that the software meets user needs and Ensures that the software meets user needs and expectations in terms of
expectations in terms of features. performance, security, usability, etc.
Objective Often involves binary outcomes (pass/fail) based on Often involves quantitative measurements and benchmarks for
Measurement
expected behavior. non-functional attributes.
Tools and Functional testing tools may include Selenium, JUnit, TestNG, etc. Non-functional testing tools may include JMeter, OWASP ZAP,
Technologies
LoadRunner, etc.
Non-Functional testing
Types Of Functional Testing and Examples
Functional testing extends from component-level testing all the way to regression testing of existing
features. It finds itself in any type of testing involved with functionality. If you are doing regression testing for
a certain feature, that is still functional testing.
● Unit Testing – Tests individual pieces of code (like functions or methods) in isolation.
● Integration Testing – Ensures different modules or components work together correctly.
● Smoke Testing – A quick, basic test to check if the main functions of the software work properly after a
build.
● Regression Testing – Verifies that recent code changes haven’t broken any existing functionality.
● Exploratory Testing – Testers explore the software freely to discover issues.
Functional testing
1) Unit Testing
Unit testing is a vital type of functional testing that involves testing the smallest functional and testable unit of
code. To ensure the highest quality of software, unit testing is an essential part of the software development
process. Below are some key points to keep in mind about unit testing:
● Unit testing is mostly performed by developers, as it is a white-box testing technique.
● It is performed during the earliest stages of development, which helps in uncovering defects during the
● Various techniques are used in unit testing, including branch coverage, statement coverage, boundary
● Branch coverage ensures that all the logical paths and conditions are covered during testing.
● Statement coverage ensures that all the statements present in the function or module are traversed at
There are two types of integration testing: Incremental and Big-Bang. Incremental integration testing
involves combining one or more components in stages and testing them until the entire system is
successfully tested. There are three approaches to incremental integration testing: Top-Down,
Bottom-Up, and Hybrid. The Big-Bang approach, on the other hand, involves integrating and testing
all of the components as a whole system.
Functional testing
3) Interface Testing
Interface testing and integration testing are two distinct types of software testing that are performed to ensure the
seamless performance of software applications. Interface testing is primarily focused on testing the communication
between different interfaces, while integration testing is focused on testing the integrated group of modules as a
single unit. During interface testing, the correctness of data exchange, data transfer, messages, calls, and
commands between two integrated components are tested. Communication between databases, web-services,
APIs, or any external component and the application is also tested during interface testing. There should not be any
error or format mismatch during this data or command communication. If any such problem is encountered, it
needs to be corrected. In summary, interface testing and integration testing are both essential to ensure that
software applications work seamlessly and without any issues.
● Interface testing focuses on testing the communication between different interfaces.
● Integration testing focuses on testing the integrated group of modules as a single unit.
● Interface testing tests the correctness of data exchange, data transfer, messages, calls, and commands between
● Communication between databases, web-services, APIs, or any external component and the application is also
4) System Testing
System Testing is a crucial phase in the Software Testing Life Cycle (STLC) that ensures that all
components of the system are seamlessly integrated and working together as per the
requirement specifications. This testing technique is a Black-Box testing method that validates
the integrated system against the predefined requirements. System Testing is performed in an
almost real-life environment and according to real-life usage. It is essential to perform System
Testing before the User Acceptance Testing (UAT) to ensure that the system is fully functional and
meets the business requirements. The following bullet points summarize the key aspects of
System Testing:
● All components of the system are combined and tested against the requirement specifications
(Functional or System).
● System Testing is performed in an almost real-life environment and according to real-life usage.
Functional testing
4) System Testing
System Testing is a crucial phase in the Software Testing Life Cycle (STLC) that ensures that all
components of the system are seamlessly integrated and working together as per the requirement
specifications. This testing technique is a Black-Box testing method that validates the integrated system
against the predefined requirements. System Testing is performed in an almost real-life environment and
according to real-life usage. It is essential to perform System Testing before the User Acceptance Testing
(UAT) to ensure that the system is fully functional and meets the business requirements. The following
bullet points summarize the key aspects of System Testing:
● All components of the system are combined and tested against the requirement specifications
(Functional or System).
● System Testing is performed in an almost real-life environment and according to real-life usage.
Functional testing
6) Smoke Testing
After the development of an application, it is essential to ensure that all major functionalities work seamlessly.
Smoke Testing is performed for the newly released build to ensure that the application is ready for the next level
of testing. Smoke testing is usually done for the builds created during the initial phase of development, which
are not yet stable. The goal of Smoke Testing is to verify that the application’s critical functionalities are working
correctly, and the build is stable enough to move to the next level of testing. If any major functionality is not
working as expected during testing, that particular build is rejected, and developers need to fix the bugs and
create a new build for further testing. Once the Smoke Testing is successful, the application is ready for the next
level of testing.
In summary, Smoke Testing is an essential testing technique that helps ensure that the newly released build
meets the required quality standards. Here are the key points to remember:
● Smoke testing is done to verify that the application’s critical functionalities are working correctly.
● Smoke testing is usually performed on the builds created during the initial phase of development, which are
● If any major functionality is not working as expected during testing, that particular build is rejected, and
developers need to fix the bugs and create a new build for further testing.
Functional testing
7) Sanity Testing
Sanity testing is an essential type of testing that covers the major functionalities of an application. It is normally
performed on a new build created by developers for a relatively stable application. The main aim of this testing is
to verify whether the application is working as expected or not. Once the application passes the Sanity Testing, it
is considered ready for the next level of testing. Here are some key points to remember about Sanity Testing:
● Sanity Testing is mainly focused on the major functionalities of an application.
● The aim of this testing is to ensure that the application is working as expected and meets the basic
requirements.
● It is essential to note that Sanity Testing is not a replacement for other types of testing, such as Smoke
2. If the user enters the correct credentials, then the application should redirect the user to the home page.
3.
Ad hoc Tests
Ad hoc tests are unplanned tests that are performed without using a specific test case or script. Testers use
domain knowledge, intuition, and experience to explore the application to find hidden bugs.
You can use these testing techniques in various combinations, depending on the nature of the application
and its requirements. They help ensure that software is thoroughly tested and reliable before its release.
Functional testing
● You can provide users with a pleasant and positive user experience with thorough functional testing.
● Functional testing and regression testing go hand in hand. It is crucial for maintaining the application’s stability
as it ensures that new code changes or bug fixes do not break existing functionalities.
● With functional testing, you check the entire application’s features and functionality, like UI, API, database,
integrations, etc. API functional testing is crucial to ensure the client/server communications work properly.
● While functional testing mainly focuses on testing the features and functionalities, it can also help identify
certain security issues, such as authorization issues, input validation problems, and so on.
paramtech.com.tr
©2024. Tüm hakları saklıdır.