Unit 4
Unit 4
Engineering?
Software engineering is the complex procedure of planning, creating and
managing computer programs or applications. Testing is essential in this
complex setting. It is a crucial stage that guarantees the software's
dependability, usefulness and quality.
a) JUnit:
Description: JUnit is a widely used open-source testing framework for Java
programming language. It provides annotations and assertions to write and
execute unit tests for Java applications.
b) NUnit:
Description: NUnit is a unit testing framework for the .NET framework, written
in C#. It allows developers to write and execute unit tests for C#, F#, and
VB.NET applications.
c) pytest:
Description: pytest is a testing framework for Python. It allows for simple unit
tests and more complex functional testing and provides detailed reports on
test results.
Use Case: Used for testing JavaScript code, especially in web applications.
e) RSpec:
Description: RSpec is a testing framework for Ruby. It follows a behaviour-
driven development (BDD) approach and allows developers to write descriptive
and readable tests.
Use Case: Commonly used for testing Ruby applications, following BDD
principles.
2. System Testing:
a) Selenium:
Description: Selenium is a widely used open-source tool for automating web
browsers. It allows testers to write scripts to interact with web elements,
making it suitable for various types of testing, including functional and
regression testing.
Use Case: Used for web application testing across different browsers.
b) Appium:
Description: Appium is an open-source tool for automating mobile
applications on iOS and Android platforms. It allows testers to write and
execute tests for mobile apps using various programming languages.
Use Case: Primarily used for mobile application testing on iOS and Android.
c) TestComplete:
Description: TestComplete is a commercial automated testing tool that
supports desktop, web, and mobile application testing. It provides a
comprehensive environment for functional, regression, and load testing.
Use Case: Used for automated desktop, web, and mobile application testing.
3. Acceptance Testing:
a) Cucumber:
Description: Cucumber is a popular tool for behavior-driven development
(BDD). It allows stakeholders to define application behaviour in plain text,
making it easier to understand and validate.
Use Case: Mainly used for acceptance testing and BDD.
4. Regression Testing:
Use Case: TestComplete is suitable for regression testing of desktop and web
applications, providing a unified platform for testing across multiple
environments.
c) JUnit (Java):
Description: JUnit is a widely used open-source testing framework for Java.
While it is commonly associated with unit testing, it can also be used for
regression testing. JUnit provides annotations and assertions to write and
execute test cases.
Use Case: JUnit is utilized for regression testing Java applications, ensuring
that new code changes do not adversely affect existing functionalities.
d) NUnit (.NET):
Description: NUnit is a popular open-source unit testing framework for
the .NET platform. Like JUnit, NUnit can also be employed for regression testing
of .NET applications. It provides a framework for writing and executing test
cases in C#, VB.NET, or F#.
Use Case: NUnit is used for regression testing .NET applications, ensuring that
new code changes do not introduce regression defects.
The purpose of having a testing type is to confirm the AUT (Application Under
Test).
o Manual Testing
o Automation 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.
To get in-detail information about manual testing, click on the following link:
manual-testing.
Classification of Manual Testing
In software testing, manual testing can be further classified into three
different types of testing, which are as follows:
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.
To get the in-depth knowledge about white box testing refers to the below
link: white-box-testing.
Then, the developers will fix those defects, do one round of White box testing,
and send it to the testing team.
Here, fixing the bugs means the defect is resolved, and the particular feature is
working according to the given requirement.
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.
For more information about Black box testing, refers to the below link: black-
box-testing.
o Functional Testing
o Non-function Testing
Functional Testing
The test engineer will check all the components systematically against
requirement specifications is known as functional testing. Functional testing
is also known as Component testing.
In functional testing, all the components are tested by giving the value,
defining the output, and validating the actual output with the expected value.
Functional testing is a part of black-box testing as its emphases on application
requirement rather than actual code. The test engineer has to test only the
program instead of the system.
To get the detailed information about functional testing refers to the below
link: functional-testing.
o Unit Testing
o Integration Testing
o System Testing
1. Unit Testing
Unit testing is the first level of functional testing in order to test any software.
In this, the test engineer will test the module of an application independently or
test all the module functionality is called unit testing.
The primary objective of executing the unit testing is to confirm the unit
components with their performance. Here, a unit is defined as a single testable
function of a software or an application. And it is verified throughout the
specified application development phase.
2. Integration Testing
Once we are successfully implementing the unit testing, we will go integration
testing. It is the second level of functional testing, where we test the data flow
between dependent modules or interface between two features is
called integration testing.
o Incremental Testing
o Non-Incremental Testing
If these modules are working fine, then we can add one more module and test
again. And we can continue with the same process to get better results.
In other words, we can say that incrementally adding up the modules and test
the data flow between the modules is known as Incremental integration
testing.
Incremental integration testing can further classify into two parts, which are as
follows:
In this approach, we will add the modules step by step or incrementally and
test the data flow between them. We have to ensure that the modules we are
adding are the child of the earlier ones.
In the bottom-up approach, we will add the modules incrementally and check
the data flow between modules. And also, ensure that the module we are
adding is the parent of the earlier ones.
3. System Testing
Whenever we are done with the unit and integration testing, we can proceed
with the system testing.
In this type of testing, we will undergo each attribute of the software and test if
the end feature works according to the business requirement. And analysis the
software product as a complete system.
Non-functional Testing
The next part of black-box testing is non-functional testing. It provides
detailed information on software product performance and used technologies.
Non-functional testing will help us minimize the risk of production and related
costs of the software.
o Performance Testing
o Usability Testing
o Compatibility Testing
1. Performance Testing
In performance testing, the test engineer will test the working of an application
by applying some load.
In this type of non-functional testing, the test engineer will only focus on
several aspects, such as Response time, Load, scalability, and Stability of
the software or an application.
Performance testing includes the various types of testing, which are as follows:
o Load Testing
o Stress Testing
o Scalability Testing
o Stability Testing
o Load Testing
While executing the performance testing, we will apply some load on the
particular application to check the application's performance, known as load
testing. Here, the load could be less than or equal to the desired load.
It will help us to detect the highest operating volume of the software and
bottlenecks.
o Stress Testing
It is used to analyze the user-friendliness and robustness of the software
beyond the common functional limits.
Primarily, stress testing is used for critical software, but it can also be used for
all types of software applications.
Refers to the below link for in-depth knowledge of stress testing: stress-testing.
o Scalability Testing
To analysis, the application's performance by enhancing or reducing the load in
particular balances is known as scalability testing.
o Stability Testing
Stability testing is a procedure where we evaluate the application's
performance by applying the load for a precise time.
It mainly checks the constancy problems of the application and the efficiency
of a developed product. In this type of testing, we can rapidly find the system's
defect even in a stressful situation.
2. Usability Testing
Another type of non-functional testing is usability testing. In usability
testing, we will analyze the user-friendliness of an application and detect the
bugs in the software's end-user interface.
o The application should be easy to understand, which means that all the features
must be visible to end-users.
o The application's look and feel should be good that means the application
should be pleasant looking and make a feel to the end-user to use it.
3. Compatibility Testing
In compatibility testing, we will check the functionality of an application in
specific hardware and software environments. Once the application is
functionally stable then only, we go for compatibility testing.
Here, software means we can test the application on the different operating
systems and other browsers, and hardware means we can test the application
on different sizes.
Since, the grey box testing includes access to internal coding for designing test
cases. Grey box testing is performed by a person who knows coding as well as
testing.
In other words, we can say that if a single-person team done both white box
and black-box testing, it is considered grey box testing.
Automation Testing
The most significant part of Software testing is Automation testing. It uses
specific tools to automate manual design test cases without any human
interference.
Automation testing is the best way to enhance the efficiency, productivity, and
coverage of Software testing.
It is used to re-run the test scenarios, which were executed manually, quickly,
and repeatedly.
.
Some other types of Software Testing
In software testing, we also have some other types of testing that are not part
of any above discussed testing, but those testing are required while testing any
software or an application.
o Smoke Testing
o Sanity Testing
o Regression Testing
o User Acceptance Testing
o Exploratory Testing
o Adhoc Testing
o Security Testing
o Globalization Testing
Let's understand those types of testing one by one:
Sanity Testing
It is used to ensure that all the bugs have been fixed and no added issues
come into existence due to these changes. Sanity testing is unscripted, which
means we cannot documented it. It checks the correctness of the newly added
features and components.
Regression Testing
Regression testing is the most commonly used type of software testing. Here,
the term regression implies that we have to re-test those parts of an
unaffected application.
Regression testing is the most suitable testing for automation tools. As per the
project type and accessibility of resources, regression testing can be similar
to Retesting.
Whenever a bug is fixed by the developers and then testing the other features
of the applications that might be simulated because of the bug fixing is known
as regression testing.
In other words, we can say that whenever there is a new release for some
project, then we can perform Regression Testing, and due to a new feature
may affect the old features in the earlier releases.
Exploratory Testing
Whenever the requirement is missing, early iteration is required, and the
testing team has experienced testers when we have a critical application. New
test engineer entered into the team then we go for the exploratory testing.
To execute the exploratory testing, we will first go through the application in all
possible ways, make a test document, understand the flow of the application,
and then test the application.
Adhoc Testing
Testing the application randomly as soon as the build is in the checked
sequence is known as Adhoc testing.
It is also called Monkey testing and Gorilla testing. In Adhoc testing, we
will check the application in contradiction of the client's requirements; that's
why it is also known as negative testing.
When the end-user using the application casually, and he/she may detect a
bug. Still, the specialized test engineer uses the software thoroughly, so he/she
may not identify a similar detection.
Security Testing
The execution of security testing will help us to avoid the nasty attack from
outsiders and ensure our software applications' security.
In other words, we can say that security testing is mainly used to define that
the data will be safe and endure the software's working process.
Globalization Testing
Another type of software testing is Globalization testing. Globalization
testing is used to check the developed software for multiple languages or not.
Here, the words globalization means enlightening the application or software
for various languages.
Globalization testing is used to make sure that the application will support
multiple languages and multiple features.
Levels of Testing
In this section, we are going to understand the various levels of software
testing.
As we learned in the earlier section of the software testing tutorial that testing
any application or software, the test engineer needs to follow multiple testing
techniques.
In order to test any application, we need to go through all the above phases of
SDLC. Like SDLC, we have multiple levels of testing, which help us maintain the
quality of the software.
1. Unit Testing
2. Integration Testing
3. System Testing
4. Acceptance Testing
As we can see in the above image that all of these testing levels have a
specific objective which specifies the value to the software development
lifecycle.
Unit testing is also the first level of functional testing. The primary purpose
of executing unit testing is to validate unit components with their performance.
Unit testing will help the test engineer and developers in order to understand
the base of code that makes them able to change defect causing code quickly.
The developers implement the unit.
It is mainly used to test the data flow from one module or component to
other modules.
When each component or module works separately, we need to check the data
flow between the dependent modules, and this process is known
as integration testing.
We only go for the integration testing when the functional testing has been
completed successfully on each application module.
In simple words, we can say that integration testing aims to evaluate the
accuracy of communication among all the modules.
The software has passed through three testing levels (Unit Testing,
Integration Testing, System Testing). Some minor errors can still be
identified when the end-user uses the system in the actual scenario.
In simple words, we can say that Acceptance testing is the squeezing of all
the testing processes that are previously done.
The acceptance testing is also known as User acceptance testing (UAT) and
is done by the customer before accepting the final product.
Usually, UAT is done by the domain expert (customer) for their satisfaction and
checks whether the application is working according to given business
scenarios and real-time scenarios.
What is a bug?
In software testing, a bug is the informal name of defects, which means that
software or application is not working as per the requirement. When we have
some coding error, it leads a program to its breakdown, which is known as a
bug. The test engineers use the terminology Bug.
If a QA (Quality Analyst) detect a bug, they can reproduce the bug and
record it with the help of the bug report template.
What is a Defect?
When the application is not working as per the requirement is knows
as defects. It is specified as the aberration from the actual and expected
result of the application or software.
In other words, we can say that the bug announced by the programmer and
inside the code is called a Defect.
What is Error?
The Problem in code leads to errors, which means that a mistake can occur due
to the developer's coding error as the developer misunderstood the
requirement or the requirement was not defined correctly.
The developers use the term error.
What is Fault?
The fault may occur in software because it has not added the code for fault
tolerance, making an application act up.
A fault may happen in a program because of the following reasons:
o Lack of resources
o An invalid step
o Inappropriate data definition
What is Failure?
Many defects lead to the software's failure, which means that a loss specifies
a fatal issue in software/ application or in its module, which makes the system
unresponsive or broken.
In other words, we can say that if an end-user detects an issue in the product,
then that particular issue is called a failure.
Possibilities are there one defect that might lead to one failure or several
failures.
The flow of the above terminologies are shown in the following image:
Raised The Test The Testers The Develop Human The failure
by Engineers su identify the ers and mistakes caus finds by the
bmit the bug. defect. And it automation e fault. manual test
was also test engineer
solved by the engineers rai through
developer in se the error. the develop
the ment cycle.
development
phase or
stage.
Stubs are mainly used in top-down integration testing; on the other hand,
drivers are mainly used in bottom-up integration testing individually and
designed the enhance the testing process.
Both Stubs and drivers are the essential part of the basic software
development and software testing process. Thus, to help us understand the
substance of stubs and drivers in software testing, we will see an exhaustive
discussion.
Types of Stubs
In the top-down approach of incremental integration testing, the stubs are
divided into four essential parts, which are as follows:
Suppose we have one web application that contains four different modules,
such as:
o Module-P
o Module-Q
o Module-R
o Module-S
And all the modules, as mentioned earlier, are responsible for some individual
activities or functionality, as we can observe in the following table:
And it is not possible to test Module-P on the lack of Module-Q. Thus, in such
scenarios, we will take the help of Stubs and Drivers in the software
testing process.
The Stubs and drivers will replicate all the basic functionality and features
displayed by the real Module-Q. And subsequently, it is being combined
with Module-P in order to execute the testing process effectively.
Now, we can validate the estimated functionality of the Login page, which
was in Module-P, only if it is going to the Home Page, which is the activity
of Module-Q as per the correct and valid inputs.
In the same way, stubs and drivers are used to accomplish the requirements
of other modules, such as the Sign-out page, which comes under the Module-
S and needs to be aimed to the Login page (Module-P) after effectively
logging out from the particular application.
Likewise, we may also use Stubs or Drivers instead of Module-R and Module-
S if they are not available.
As the result of the inaccessibility of Module-P, stubs and drivers will work as
an alternate for it to perform the testing of Module-S.
But here, the question arises that both drivers and Stubs serve the
same functionality?
Yes, we can say that both stubs and drivers carry out similar features and
objectives. Both of them act as an alternative for the missing or absent
module. But, the change between them can be pictured throughout the
integration testing process.
o Stubs and Drivers design as a dummy for the missing or inaccessible modules
or the components.
o Most commonly, stubs and drivers are used in the incremental
integration testing, where stubs are used in top-bottom
methodology while drivers are used in a bottom-up methodology.
o Usually, developers and unit test engineers are included in the creation of stubs
and drivers.
o Even though it provides an ease to perform the separate components or the
modules without worrying about the accessibility of other modules, and leads
them into a time-consuming process, as it involves the development of replica
for all the missing modules.
o Precisely, stubs and drivers are developed for each module holding different
purposes.
Stubs VS Drivers
Here, we are discussing some significant comparisons between Stubs and
Drivers in the below table:
Stubs Drivers
The stubs are created by the Mostly, the drivers are created
team of test engineers. by the developer and the unit
Test engineers.
The stubs signify the low-level The drivers signify the high-
modules. level modules.
These are reserved for testing The drivers are used if the core
the feature and functionality of module of the software isn't
the modules. established for testing.
The software technical review finds defects from the early stages of the SDLC.
The technical review ensures that the software is built as per compliances, standards,
and requirements.
The software technical review suggests areas of improvements in the documentation,
design, architecture, and code.
The software technical review encourages exchange of knowledge among all the team
members.
The technical review ensures that the software adheres to compliances, and
regulations.
1. Peer Review
They are informal, and unstructured reviews done by the team members,
peers, or colleagues to provide fast feedback so that the quality of delivered
software is enhanced, and quick corrective measures are taken. It proceeds
with the help of collaborative discussions. It occurs without prior planning may
be at the time of knowledge sharing or pair programming. For example, a
developer requests his team mate to review his code.
2. Walkthroughs
They are semi-formal reviews where the author of the document or code
describes it to a group of reviewers. The objective is mainly to share the
understanding of his work among the team members rather than finding
errors. The reviewers ask questions and pass the required suggestions. There
is no formal defect logging in the process. It is generally a knowledge sharing
platform. For example, the project manager walks through the project roadmap
to the entire team.
3. Inspections
They are formal, methodical, and structured reviews done to detect errors, and
to suggest areas of correction. It is used to identify defects from the early
stages of the SDLC, and to improve the software quality. It involves proper
planning, composition, meeting, rework, and follow up. It comprises the
moderator, author, scribe, reviewers etc. For example, a development team
organizes an inspection meeting on the code developed for the last release of
the software.
4. Audits
These types of reviews are done to ensure that the software is built as per the
given requirements, regulations, standards, legal and contractual agreements.
They are conducted by external or internal teams. The audits are on the basis
of some predefined criterias, the discrepancies and non-compliances are
documented, and reported. For example, a group of auditors reviews if the
software development processes followed are as per the ISO standards.
Sr.N
Formal Reviews Informal Reviews
o.
They help to identify bugs, and to ensure They give fast feedback, and find
1 that the software is built as per the obvious defects in the software usually
compliances, and specifications. during the knowledge sharing process.
The software technical review boosts the confidence, and morale of the team
members for being able to show cause their works to external members.
The technical review improves the developers overall understanding of the working of
software, and which in turn helps them to maintain the code in an efficient manner.
The software technical aids in tracking the project with respect to the customers, and
project management.
The technique helps to gather feedback, and suggestions on the software, and its
development process.