UNIT-3 Software Testing
UNIT-3 Software Testing
o In this section, we are going to understand the various types of software testing, which
can be used at the time of the Software Development Life Cycle.
Testing any software or an application according to the client's needs without using
any automation tool is known as manual testing
We do not require any precise knowledge of any testing tool to execute the manual
test cases. We can easily prepare the test document while performing manual testing on any
application.
In software testing, manual testing can be further classified into three different types of
testing, which are as follows:
White Box Testing
In white-box testing, the developer will inspect every line of code before handing it
over to the testing team or the concerned test engineers.
Subsequently, the code is noticeable for developers throughout testing; that's why this
process is known as WBT (White Box Testing).
In other words, we can say that the developer will execute the complete white-box
testing for the particular software and send the specific application to the testing team.
The purpose of implementing the white box testing is to emphasize the flow of inputs
and outputs over the software and enhance the security of an application.
White box testing is also known as open box testing, glass box testing, structural testing,
clear box testing, and transparent box testing.
White box testing can be done for different purposes. The three main types are:
1. Unit Testing
2. Integration Testing
3. Regression Testing
Unit Testing
Checks if each part or function of the application works correctly.
Ensures the application meets design requirements during development.
Integration Testing
Examines how different parts of the application work together.
Done after unit testing to make sure components work well both alone
and together.
Regression Testing
Verifies that changes or updates don’t break existing functionality.
Ensures the application still passes all existing tests after updates.
Another type of manual testing is black-box testing. In this testing, the test engineer
will analyze the software against requirements, identify the defects or bug, and sends
it back to the development team.
Then, the developers will fix those defects, do one round of White box testing, and
send it to the testing team.
The main objective of implementing the black box testing is to specify the business
needs or the customer's requirements.
In other words, we can say that black box testing is a process of checking the
functionality of an application as per the customer requirement. The source code is
not visible in this testing; that's why it is known as black-box testing.
GreyBox Testing
Greybox testing is a software testing method to test the software application with
partial knowledge of the internal working structure.
It is a combination of black box and white box testing because it involves access to
internal coding to design test cases as white box testing and testing practices are done
at functionality level as black box testing.
S.
Black Box Testing Gray Box Testing White Box Testing
No.
It is done by end-users
It is done by end-users It is generally done
(called user acceptance
2. and also by the tester and by testers and
testing) and also by
developers. developers.
testers and developers.
It is likely to be less
Most exhaustive
3. exhaustive than the other It is kind of in-between.
among all three.
two.
Testing Types
Unit Testing
Unit testing involves the testing of each unit or an individual component of the
software application.
A unit is a single testable part of a software system and tested during the development
phase of the application software.
1. Amount transfer
Below are the application access details, which is given by the customer
While performing unit testing, we should follow some rules, which are as
follows:
When we feel that the maximum test coverage is achieved, we will stop
the testing.
Now, we will start performing the unit testing on the different components
such as
o From account number(FAN)
o To account number(TAN)
o Amount
o Transfer
o Cancel
Values Description
1234 accept
o Provide the values just like we did in From account number (FAN)
components
o Provide the values just like we did in FAN and TAN components.
o NUnit
o JUnit
o PHPunit
o Parasoft Jtest
o EMMA
Advantages
o Unit testing uses module approach due to that any part can be tested without waiting for
completion of another parts testing.
o The developing team focuses on the provided functionality of the unit and how functionality
should look in unit test suits to understand the unit API.
o Unit testing allows the developer to refactor code after a number of days and ensure the
module still working without any defect.
Disadvantages
o It cannot identify integration or broad level error as it works on units of the code.
o In the unit testing, evaluation of all execution paths is not possible, so unit testing is not able
to catch each and every error in a program.
o It is best suitable for conjunction with other testing activities.
Integration testing
Integration testing is the second level of the software testing process comes after unit
testing.
In this testing, units or individual components of the software are tested in a group.
The focus of the integration testing level is to expose defects at the time of interaction
between integrated components or units.
Once all the components or modules are working independently, then we need to check the
data flow between the dependent modules is known as integration testing.
Let us see one sample example of a banking application, as we can see in the below image of
amount transfer.
o First, we will login as a user P to amount transfer and send Rs200 amount, the confirmation
message should be displayed on the screen as amount transfer successfully. Now logout as P
and login as user Q and go to amount balance page and check for a balance in that account =
Present balance + Received Balance. Therefore, the integration test is successful.
o Also, we check if the amount of balance has reduced by Rs200 in P user account.
o Click on the transaction, in P and Q, the message should be displayed regarding the data and
time of the amount transfer.
Scenarios1:
o First, we login as P users and click on the Compose mail and performing the functional
testing for the specific components.
o Now we click on the Send and also check for Save Drafts.
o After that, we send a mail to Q and verify in the Send Items folder of P to check if the send
mail is there.
o Now, we will log out as P and login as Q and move to the Inbox and verify that if the mail
has reached.
o Among the two features, we must be performing only positive integrating testing or
both positive and negative integration testing, and this also depends on the features need.
Generally, two or more than two modules are added and tested to
determine the correctness of functions.
The process continues until the successful testing of all the modules.
o Top-Down approach
o Bottom-Up approach
We will go for this method, when the data flow is very complex and
when it is difficult to find who is a parent and who is a child. And in
such case, we will create the data in any module bang on all other
existing modules and check if the data is present. Hence, it is also
known as the Big bang method.
System Testing
System Testing includes testing of a fully integrated software system.
Generally, a computer system is made with the integration of software
(any software is only a single element of a computer system).
System testing is divided into more than 50 types, but software testing
companies typically uses some of them. These are listed below:
Performance Testing
we will learn about performance testing, why we need it, types of performance testing, and
the performance testing process.
Response time: Response time is the time taken by the server to respond to the
client's request.
Load: Here, Load means that when N-number of users using the application
simultaneously or sending the request to the server at a time.
Stability: For the stability factor, we can say that, when N-number of users using the
application simultaneously for a particular time.
Let us discuss one by one to give you a complete understanding of Load, Stress,
Scalability, and Stability performance testing.
Load testing
The load testing is used to check the performance of an application by applying some load
which is either less than or equal to the desired load is known as load testing.
For example: In the below image, 1000 users are the desired load, which is given by the
customer, and 3/second is the goal which we want to achieve while performing a load
testing.
Stress Testing
The stress testing is testing, which checks the behavior of an application by applying load
greater than the desired load.
For example: If we took the above example and increased the desired load 1000 to 1100
users, and the goal is 4/second. While performing the stress testing in this scenario, it will
pass because the load is greater (100 up) than the actual desired load.
Scalability Testing
It is testing where we increase the number of users on a particular scale until we get a
crash point. We will use upward scalability testing to find the maximum capacity of an
application.
The downward scalability testing is used when the load testing is not passed, then
start decreasing the no. of users in a particular interval until the goal is achieved. So that it
is easy to identify the bottleneck (bug).
Stability Testing
Checking the performance of an application by applying the load for a particular duration
of time is known as Stability Testing.
If we perform a positive flow of the performance testing process, it could
follow the below process:
We have various types of performance testing tools available in the market, where
some are commercial tools and open-source tool.
Security Testing
Security testing is an integral part of software testing, which is used to discover the
weaknesses, risks, or threats in the software application and also help us to stop the
nasty attack from the outsiders and make sure the security of our software
applications.
The primary objective of security testing is to find all the potential ambiguities and
vulnerabilities of the application so that the software does not stop working. If we
perform security testing, then it helps us to identify all the possible security threats
and also help the programmer to fix those errors.
Principle of Security testing
We have various security testing tools available in the market, which are as
follows:
o SonarQube
o ZAP
o Netsparker
o Arachni
o IronWASP
Recovery testing
And we also learn about its process, why we need to perform the recovery
testing, who perform the recovery testing, example, advantage and
disadvantage.
o Standard operations
o Disaster and failure occurrence
o Interruption to Standard Process
o Recovery Process
o Rebuild Process
Advantages:
Some of the major benefits of performing the recovery testing are as follows:
compatibility testing
It is part of non-functional testing.
Checking the functionality of an application on different software, hardware platforms,
network, and browsers is known as compatibility testing.
o Alignment issue
o Overlap issue
o Scattered issue
o Look and feel issue
Alignment issue
The alignment issue is that in which the element of the page is not aligned in a proper format
as we can see in the below image:
Overlap issue
When one attribute is overlapping to another attribute, it may happen when we are trying to
open the application on the different platforms, browsers as we can see in the below image:
Scattered issue
When the test engineer performing compatibility testing on the application, and that
application is not compatible with all browsers, and platform that's why the scattered issues
may occur as we can see in the below image:
Testing the functionality, integration, and end-to-end flow on the different platforms are what
we do in the compatibility testing.
Compatibility issue: When the application feature is not working in one operating
system, but working fine in other operating systems. It happens because a program written by
the developer is not working in only one platform, but working fine on all other platforms.
Functionality issue: when a feature is not working in all operating system/ platform.
And it is also known as functionality defect issue.
For compatibility testing, the test execution report looks something like this:
o LambdaTest
o BrowserStack
o BrowseEMAll
o TestingBot
Regression Testing:
Regression testing is a black box testing techniques.
It is used to authenticate a code change in the software does not impact the existing
functionality of the product.
Regression testing is making sure that the product works fine with new
functionality, bug fixes, or any change in the existing feature.
Regression Testing Process
The regression testing process can be performed across the builds and
the releases.
Ranorex Studio
Defect verification is the part of the Regression testing does not include defect
Retesting. verification
The priority of Retesting is higher than Based on the project type and availability of
Regression Testing, so it is done before the resources, regression testing can be
Regression Testing. parallel to Retesting.
Installation testing:
Testing the procedures to achieve an installed software system that can be
used is known as installation testing.
In this installation testing checking full or partial upgrades and other
features install/uninstall processes are included.
The installation testing ensures that the software application has been
successfully installed with all its inherent features or not. It is also named
implementation testing, mainly it’s done in the end phase.
The features of installation testing:
Network Installation: It tests the installation process across a network
if the programme allows network installations. Make that the
programme can be installed correctly on various computers connected
to the network.
Error Handling: Examine the ways in which the installation process
responds to different types of errors, including invalid input,
insufficient disc space and interrupted installations. Make that the right
error messages appear and that instructions on how to fix problems are
provided to users.
Impact on Performance: Evaluate how the installation procedure
affects the functionality of the machine. Make sure the installation
won’t interfere with other open apps or drastically decrease system
performance.
Validation of Documentation: Make sure the installation instructions
are easy to understand for users and that the documentation
appropriately depicts the installation procedure. This involves ensuring
that the installation instructions and the documentation are consistent
with one another.
Verification of File Integrity: To make sure that all required files are
accurately copied throughout the installation process, run a file integrity
check. This include confirming rights, checksums and file sizes.
Registry and Configuration Parameters: Verify that during
installation, the programme accurately modifies configuration settings
and registry entries. Examine the setup for any inconsistencies or
mistakes that can affect the software’s functionality.
Advantages of installation testing
The first biggest advantage is that it verifies the designs of apps and
software on a basic level of test performance.
It’s a very crucial part of STLC which helps in maintaining the standard
according to that.
It’s a very quick and handy method to check the version of the software
Dis-advantages of installation testing
Time-consuming: Installation testing can be time-consuming, especially
if the software needs to be tested on multiple operating systems,
hardware, and software configurations.
Resource-intensive: Installation testing requires significant resources,
including hardware, software, and personnel, which can be costly for
organizations, especially for smaller ones.
Limited scope: Installation testing typically focuses on the installation
and configuration process and may not cover other areas of the
software, such as functionality or performance.
False sense of security: If installation testing is the only type of testing
conducted, there may be a false sense of security that the software is of
high quality.
Dependence on user environment: Installation testing is dependent on
the user environment, and the software may behave differently on
different systems and configurations.
Usability Testing:
Acceptance testing
It is conducted as a kind of Black Box testing where the number of required users
involved testing the acceptance level of the system. It is the fourth and last level of
software testing.
a. Customers are not willing to do that; it defeats the whole point of acceptance testing.
b. If test cases are written by someone else, the customer does not understand them, so tester has
to perform the inspections by themselves only.
If the process is done in this manner, it destroys the existence of the Acceptance Testing.
Alpha testing is simulated or real operational testing at an in-house site. It comes after
the unit testing, integration testing, etc. Alpha testing used after all the testing are
executed.
First Phase: In-house developers of software engineers do the first phase of testing. In this
phase, the tester used hardware debugger or hardware aided debugger to catches the bugs
quickly. During the alpha testing, a tester finds a lot of bugs, crashes, missing features, and
docs.
Second Phase: The second phase involves the quality assurance staff performs the alpha
testing by involving black box and white box techniques.
o One of the benefits of alpha testing is it reduces the delivery time of the project.
o It provides a complete test plan and test cases.
o Free the team member for another project.
Beta Testing:
Beta testing is a type of User Acceptance Testing among the most crucial testing,
which performed before the release of the software.
Beta Testing is a type of Field Test. This testing performs at the end of
the software testing life cycle.
o This type of testing can be considered as external user acceptance testing. It is a type
of salient
o Beta testing used in a real environment at the user's site. Beta testing helps in providing the
actual position of the quality.
o Testing performed by the client, stakeholder, and end-user.
o Beta testing always is done after the alpha testing, and before releasing it into the market.
o Beta testing is black-box testing.
o Beta testing performs in the absence of tester and the presence of real users
o Beta testing is performed after alpha testing and before the release of the final product.
o Beta testing generally is done for testing software products like utilities, operating systems,
and applications, etc.
Advantages:
1. Beta testing focuses on the customer's satisfaction.
2. It helps to reduce the risk of product failure via user validations.
3. Beta testing helps to get direct feedback from users.
Disadvantages :
1. In this type of testing, a software engineer has no control over the process of the testing, as the
users in the real-world environment perform it.
2. This testing can be a time-consuming process and can delay the final release of the product.
In static testing, we will check the code or In dynamic testing, we will check the
the application without executing the code/application by executing the code.
code.
Static testing includes activities like code Dynamic testing includes activities like
Review, Walkthrough, etc. functional and non-functional testing such as
UT (usability testing), IT (integration testing),
ST (System testing) & UAT (user acceptance
testing).
Static testing is used to prevent defects. Dynamic testing is used to find and fix the
defects.
This type of testing can be performed Dynamic testing can be done only after the
before the compilation of code. executables are prepared.
Under static testing, we can perform the Equivalence Partitioning and Boundary Value
statement coverage testing and structural Analysis technique are performed under
testing. dynamic testing.
Difference between the Black Box testing and White box testing
ASPECTS BLACK BOX TESTING WHITE BOX TESTING
9. Base of testing The base of this testing is The base of this testing is
external expectations. coding which is responsible
for internal working.
14 Testing method It can be performed by trial It can test data domain and
. and error technique. data boundaries in a better
way.
Testing in which a human tester executes test In automation testing, automation tools are used to
cases execute the test cases
In this testing, human resources are involved, It is much faster than the manual testing
that's why it is time-consuming
It is repetitive and error-prone Here automated tools are used that make it interesting
and accurate
BVT (build verification testing) is time- It's easy to build verification testing
consuming and tough in manual testing
Instead of frameworks, this testing use Frameworks like keyword, hybrid, and data drive to
checklist, guidelines, and stringent process for accelerate the automation process.
drafting test cases.
The process turnaround time is higher than It completes a single round of testing within record time;
the automation testing process (one testing therefore, a process turnaround time is much lower than
cycle takes lots of time) a manual testing process.
The main goal of manual testing is user- Automation testing can only guarantee a positive
friendliness or improved customer customer experience and user-friendliness.
experience.
It is best for usability, exploratory and adhoc It is widely used for performing testing, load testing and
testing regression testing.