Software Testing Techniques
Software Testing Techniques
Software Testing Techniques
INTRODUCTION
Unit -1
INTRODUCTION
Software engineering is an engineering branch associated with development of software
product using well-defined scientific principles, methods and procedures. The outcome of
software engineering is an efficient and reliable software product.
Software project management has wider scope than software engineering process as it
involves communication, pre and post delivery support etc.
This tutorial should provide you basic understanding of software product, software design
and development process, software project management and design complexities etc. At
the end of the tutorial you should be equipped with well understanding of software
engineering concepts.
Software is more than just a program code. A program is an executable code, which serves
some computational purpose. Software is considered to be collection of executable
programming code, associated libraries and documentations. Software, when made for a
specific requirement is called software product.
Engineering on the other hand, is all about developing products, using well-defined,
scientific principles and methods.
Definitions
Software Evolution
The process of developing a software product using software engineering principles and
methods is referred to as software evolution. This includes the initial development of
software and its maintenance and updates, till desired software product is developed,
which satisfies the expected requirements.
Evolution starts from the requirement gathering process. After which developers create a
prototype of the intended software and show it to the users to get their feedback at the
early stage of software product development. The users suggest changes, on which several
consecutive updates and maintenance keep on changing too. This process changes to the
original software, till the desired software is accomplished.
Even after the user has desired software in hand, the advancing technology and the
changing requirements force the software product to change accordingly. Re-creating
software from scratch and to go one-on-one with requirement is not feasible. The only
feasible and economical solution is to update the existing software so that it matches the
latest requirements.
Software Paradigms
Requirement gathering
Software design
Programming
Design
Maintenance
Programming
Programming Paradigm
This paradigm is related closely to programming aspect of software development. This
includes –
Coding
Testing
Integration
The need of software engineering arises because of higher rate of change in user
requirements and environment on which the software is working.
Operational
Transitional
Maintenance
Well-engineered and crafted software is expected to have the following characteristics:
Operational
This tells us how well software works in operations. It can be measured on:
Budget
Usability
Efficiency
Correctness
Functionality
Dependability
Security
Safety
Transitional
This aspect is important when the software is moved from one platform to another:
Portability
Interoperability
Reusability
Adaptability
Maintenance
This aspect briefs about how well software has the capabilities to maintain itself in the
ever-changing environment:
Modularity
Maintainability
Flexibility
Scalability
In short, Software engineering is a branch of computer science, which uses well-defined
engineering concepts required to produce efficient, durable, scalable, in-budget and on-
time software products.
Software Development Life Cycle, SDLC for short, is a well-defined, structured sequence of
stages in software engineering to develop the intended software product. SDLC is a process
that consists of a series of planned activities to develop or alter the Software Products.
Software Development Life Cycle (SDLC) is a process used by the software industry to
design, develop and test high quality softwares. The SDLC aims to produce a high-quality
software that meets or exceeds customer expectations, reaches completion within times
and cost estimates.
SDLC is a process followed for a software project, within a software organization. It consists
of a detailed plan describing how to develop, maintain, replace and alter or enhance
specific software. The life cycle defines a methodology for improving the quality of
software and the overall development process.
SDLC is the acronym of Software Development Life Cycle.
It is also called as Software Development Process.
SDLC is a framework defining tasks performed at each step in the software
development process.
ISO/IEC 12207 is an international standard for software life-cycle processes. It aims
to be the standard that defines all the tasks required for developing and
maintaining software.
SDLC Models
There are various software development life cycle models defined and designed which are
followed during the software development process. These models are also referred as
Software Development Process Models. Each process model follows a Series of steps
unique to its type to ensure success in the process of software development.
Following are the most important and popular SDLC models followed in the industry −
Waterfall Model
Iterative Model
Spiral Model
V-Model
Big Bang Model
Other related methodologies are Agile Model, RAD Model, Rapid Application Development
and Prototyping Models.
The Waterfall Model was the first Process Model to be introduced. It is also referred to as
a linear-sequential life cycle model. It is very simple to understand and use. In a waterfall
model, each phase must be completed before the next phase can begin and there is no
overlapping in the phases.
The Waterfall model is the earliest SDLC approach that was used for software
development.
The waterfall Model illustrates the software development process in a linear sequential
flow. This means that any phase in the development process begins only if the previous
phase is complete. In this waterfall model, the phases do not overlap.
Waterfall approach was first SDLC Model to be used widely in Software Engineering to
ensure success of the project. In "The Waterfall" approach, the whole process of software
development is divided into separate phases. In this Waterfall model, typically, the
outcome of one phase acts as the input for the next phase sequentially.
The following illustration is a representation of the different phases of the Waterfall Model.
Every software developed is different and requires a suitable SDLC approach to be followed
based on the internal and external factors. Some situations where the use of Waterfall
model is most appropriate are −
Requirements are very well documented, clear and fixed.
Product definition is stable.
Technology is understood and is not dynamic.
There are no ambiguous requirements.
Ample resources with required expertise are available to support the product.
The project is short.
The advantages of waterfall development are that it allows for departmentalization and
control. A schedule can be set with deadlines for each stage of development and a product
can proceed through the development process model phases one by one.
Development moves from concept, through design, implementation, testing, installation,
troubleshooting, and ends up at operation and maintenance. Each phase of development
proceeds in strict order.
Some of the major advantages of the Waterfall Model are as follows −
Simple and easy to understand and use
Easy to manage due to the rigidity of the model. Each phase has specific deliverables
and a review process.
Phases are processed and completed one at a time.
Works well for smaller projects where requirements are very well understood.
Clearly defined stages.
Well understood milestones.
Easy to arrange tasks.
Process and results are well documented.
The disadvantage of waterfall development is that it does not allow much reflection or
revision. Once an application is in the testing stage, it is very difficult to go back and change
something that was not well-documented or thought upon in the concept stage.
The major disadvantages of the Waterfall Model are as follows −
No working software is produced until late during the life cycle.
High amounts of risk and uncertainty.
Not a good model for complex and object-oriented projects.
Poor model for long and ongoing projects.
Not suitable for the projects where requirements are at a moderate to high risk of
changing. So, risk and uncertainty is high with this process model.
It is difficult to measure progress within stages.
Cannot accommodate changing requirements.
Adjusting scope during the life cycle can end a project.
Integration is done as a "big-bang. at the very end, which doesn't allow identifying
any technological or business bottleneck or challenges early.
The spiral model combines the idea of iterative development with the systematic,
controlled aspects of the waterfall model. This Spiral model is a combination of iterative
development process model and sequential linear development model i.e. the waterfall
model with a very high emphasis on risk analysis. It allows incremental releases of the
product or incremental refinement through each iteration around the spiral.
The spiral model has four phases. A software project repeatedly passes through these
phases in iterations called Spirals.
Identification
This phase starts with gathering the business requirements in the baseline spiral. In the
subsequent spirals as the product matures, identification of system requirements,
subsystem requirements and unit requirements are all done in this phase.
This phase also includes understanding the system requirements by continuous
communication between the customer and the system analyst. At the end of the spiral, the
product is deployed in the identified market.
Design
The Design phase starts with the conceptual design in the baseline spiral and involves
architectural design, logical design of modules, physical product design and the final design
in the subsequent spirals.
Construct or Build
The Construct phase refers to production of the actual software product at every spiral. In
the baseline spiral, when the product is just thought of and the design is being developed a
POC (Proof of Concept) is developed in this phase to get customer feedback.
Then in the subsequent spirals with higher clarity on requirements and design details a
working model of the software called build is produced with a version number. These
builds are sent to the customer for feedback.
Based on the customer evaluation, the software development process enters the next
iteration and subsequently follows the linear approach to implement the feedback
suggested by the customer. The process of iterations along the spiral continues throughout
the life of the software.
The Spiral Model is widely used in the software industry as it is in sync with the natural
development process of any product, i.e. learning with maturity which involves minimum
risk for the customer as well as the development firms.
The following pointers explain the typical uses of a Spiral Model −
When there is a budget constraint and risk evaluation is important.
For medium to high-risk projects.
Long-term project commitment because of potential changes to economic priorities
as the requirements change with time.
Customer is not sure of their requirements which is usually the case.
Requirements are complex and need evaluation to get clarity.
New product line which should be released in phases to get enough customer
feedback.
Significant changes are expected in the product during the development cycle.
The advantage of spiral lifecycle model is that it allows elements of the product to be
added in, when they become available or known. This assures that there is no conflict with
previous requirements and design.
This method is consistent with approaches that have multiple software builds and releases
which allows making an orderly transition to a maintenance activity. Another positive
aspect of this method is that the spiral model forces an early user involvement in the
system development effort.
On the other side, it takes a very strict management to complete such products and there
is a risk of running the spiral in an indefinite loop. So, the discipline of change and the
extent of taking change requests is very important to develop and deploy the product
successfully.
The advantages of the Spiral SDLC Model are as follows −
Changing requirements can be accommodated.
Allows extensive use of prototypes.
Requirements can be captured more accurately.
Users see the system early.
Development can be divided into smaller parts and the risky parts can be developed
earlier which helps in better risk management.
The disadvantages of the Spiral SDLC Model are as follows −
Management is more complex.
End of the project may not be known early.
Not suitable for small or low risk projects and could be expensive for small projects.
Process is complex
Spiral may go on indefinitely.
Large number of intermediate stages requires excessive documentation.
The V-model is an SDLC model where execution of processes happens in a sequential
manner in a V-shape. It is also known as Verification and Validation model.
The V-Model is an extension of the waterfall model and is based on the association of a
testing phase for each corresponding development stage. This means that for every single
phase in the development cycle, there is a directly associated testing phase. This is a highly-
disciplined model and the next phase starts only after completion of the previous phase.
V-Model - Design
Under the V-Model, the corresponding testing phase of the development phase is planned
in parallel. So, there are Verification phases on one side of the ‘V’ and Validation phases on
the other side. The Coding Phase joins the two sides of the V-Model.
The following illustration depicts the different phases in a V-Model of the SDLC.
V-Model - Verification Phases
There are several Verification phases in the V-Model, each of these are explained in detail
below.
System Design
Once you have the clear and detailed product requirements, it is time to design the
complete system. The system design will have the understanding and detailing the
complete hardware and communication setup for the product under development. The
system test plan is developed based on the system design. Doing this at an earlier stage
leaves more time for the actual test execution later.
Architectural Design
Architectural specifications are understood and designed in this phase. Usually more than
one technical approach is proposed and based on the technical and financial feasibility the
final decision is taken. The system design is broken down further into modules taking up
different functionality. This is also referred to as High Level Design (HLD).
The data transfer and communication between the internal modules and with the outside
world (other systems) is clearly understood and defined in this stage. With this
information, integration tests can be designed and documented during this stage.
Module Design
In this phase, the detailed internal design for all the system modules is specified, referred
to as Low Level Design (LLD). It is important that the design is compatible with the other
modules in the system architecture and the other external systems. The unit tests are an
essential part of any development process and helps eliminate the maximum faults and
errors at a very early stage. These unit tests can be designed at this stage based on the
internal module designs.
Coding Phase
The actual coding of the system modules designed in the design phase is taken up in the
Coding phase. The best suitable programming language is decided based on the system and
architectural requirements.
The coding is performed based on the coding guidelines and standards. The code goes
through numerous code reviews and is optimized for best performance before the final
build is checked into the repository.
Validation Phases
Integration Testing
Integration testing is associated with the architectural design phase. Integration tests are
performed to test the coexistence and communication of the internal modules within the
system.
System Testing
System testing is directly associated with the system design phase. System tests check the
entire system functionality and the communication of the system under development with
external systems. Most of the software and hardware compatibility issues can be
uncovered during this system test execution.
Acceptance Testing
Acceptance testing is associated with the business requirement analysis phase and involves
testing the product in user environment. Acceptance tests uncover the compatibility issues
with the other systems available in the user environment. It also discovers the non-
functional issues such as load and performance defects in the actual user environment.
V- Model ─ Application
V- Model application is almost the same as the waterfall model, as both the models are of
sequential type. Requirements have to be very clear before the project starts, because it is
usually expensive to go back and make changes. This model is used in the medical
development field, as it is strictly a disciplined domain.
The following pointers are some of the most suitable scenarios to use the V-Model
application.
Requirements are well defined, clearly documented and fixed.
Product definition is stable.
Technology is not dynamic and is well understood by the project team.
There are no ambiguous or undefined requirements.
The project is short.
V- Model - Pros and Cons
The advantage of the V-Model method is that it is very easy to understand and apply. The
simplicity of this model also makes it easier to manage. The disadvantage is that the model
is not flexible to changes and just in case there is a requirement change, which is very
common in today’s dynamic world, it becomes very expensive to make the change.
The advantages of the V-Model method are as follows −
This is a highly-disciplined model and Phases are completed one at a time.
Works well for smaller projects where requirements are very well understood.
Simple and easy to understand and use.
Easy to manage due to the rigidity of the model. Each phase has specific deliverables
and a review process.
The disadvantages of the V-Model method are as follows −
High risk and uncertainty.
Not a good model for complex and object-oriented projects.
Poor model for long and ongoing projects.
Not suitable for the projects where requirements are at a moderate to high risk of
changing.
Once an application is in the testing stage, it is difficult to go back and change a
functionality.
No working software is produced until late during the life cycle.
The Software Prototyping refers to building software application prototypes which displays
the functionality of the product under development, but may not actually hold the exact
logic of the original software.
Software prototyping is becoming very popular as a software development model, as it
enables to understand customer requirements at an early stage of development. It helps
get valuable feedback from the customer and helps software designers and developers
understand about what exactly is expected from the product under development.
Prototype is a working model of software with some limited functionality. The prototype
does not always hold the exact logic used in the actual software application and is an extra
effort to be considered under effort estimation.
Prototyping is used to allow the users evaluate developer proposals and try them out
before implementation. It also helps understand the requirements which are user specific
and may not have been considered by the developer during product design.
Following is a stepwise approach explained to design a software prototype.
Basic Requirement Identification
This step involves understanding the very basics product requirements especially in terms
of user interface. The more intricate details of the internal design and external aspects like
performance and security can be ignored at this stage.
There are different types of software prototypes used in the industry. Following are the
major software prototyping types used widely −
Throwaway/Rapid Prototyping
Throwaway prototyping is also called as rapid or close ended prototyping. This type of
prototyping uses very little efforts with minimum requirement analysis to build a
prototype. Once the actual requirements are understood, the prototype is discarded and
the actual system is developed with a much clear understanding of user requirements.
Evolutionary Prototyping
Evolutionary prototyping also called as breadboard prototyping is based on building actual
functional prototypes with minimal functionality in the beginning. The prototype
developed forms the heart of the future prototypes on top of which the entire system is
built. By using evolutionary prototyping, the well-understood requirements are included in
the prototype and the requirements are added as and when they are understood.
Incremental Prototyping
Incremental prototyping refers to building multiple functional prototypes of the various
sub-systems and then integrating all the available prototypes to form a complete system.
Extreme Prototyping
Extreme prototyping is used in the web development domain. It consists of three
sequential phases. First, a basic prototype with all the existing pages is presented in the
HTML format. Then the data processing is simulated using a prototype services layer.
Finally, the services are implemented and integrated to the final prototype. This process is
called Extreme Prototyping used to draw attention to the second phase of the process,
where a fully functional UI is developed with very little regard to the actual services.
Software Prototyping is most useful in development of systems having high level of user
interactions such as online systems. Systems which need users to fill out forms or go
through various screens before data is processed can use prototyping very effectively to
give the exact look and feel even before the actual software is developed.
Software that involves too much of data processing and most of the functionality is internal
with very little user interface does not usually benefit from prototyping. Prototype
development could be an extra overhead in such projects and may need lot of extra efforts.
Software prototyping is used in typical cases and the decision should be taken very
carefully so that the efforts spent in building the prototype add considerable value to the
final software developed. The model has its own pros and cons discussed as follows.
The advantages of the Prototyping Model are as follows −
Increased user involvement in the product even before its implementation.
Since a working model of the system is displayed, the users get a better
understanding of the system being developed.
Reduces time and cost as the defects can be detected much earlier.
Quicker user feedback is available leading to better solutions.
Missing functionality can be identified easily.
Confusing or difficult functions can be identified.
The Disadvantages of the Prototyping Model are as follows −
Risk of insufficient requirement analysis owing to too much dependency on the
prototype.
Users may get confused in the prototypes and actual systems.
Practically, this methodology may increase the complexity of the system as scope of
the system may expand beyond original plans.
Developers may try to reuse the existing prototypes to build the actual system, even
when it is not technically feasible.
The effort invested in building prototypes may be too much if it is not monitored
properly.
Testing is the process of evaluating a system or its component(s) with the intent to find
whether it satisfies the specified requirements or not.
Testing is executing a system in order to identify any gaps, errors, or missing requirements
in contrary to the actual requirements.
This tutorial will give you a basic understanding on software testing, its types, methods,
levels, and other related terminologies.
In the IT industry, large companies have a team with responsibilities to evaluate the
developed software in context of the given requirements. Moreover, developers also
conduct testing which is called Unit Testing. In most cases, the following professionals are
involved in testing a system within their respective capacities −
Software Tester
Software Developer
Project Lead/Manager
End User
Different companies have different designations for people who test the software on the
basis of their experience and knowledge such as Software Tester, Software Quality
Assurance Engineer, QA Analyst, etc.
Cost Effective Development - Early testing saves both time and cost in many
aspects, however reducing the cost without testing may result in improper design
of a software application rendering the product useless.
Product Improvement - During the SDLC phases, testing is never a time-consuming
process. However diagnosing and fixing the errors identified during proper testing is
a time-consuming but productive activity.
Test Automation - Test Automation reduces the testing time, but it is not possible to
start test automation at any time during software development. Test automaton
should be started when the software has been manually tested and is stable to
some extent. Moreover, test automation can never be used if requirements keep
changing.
Quality Check - Software testing helps in determining following set of properties of
any software such as
o Functionality
o Reliability
o Usability
o Efficiency
o Maintainability
o Portability
What is Testing?
Testing is the process of evaluating a system or its component(s) with the intent to find
whether it satisfies the specified requirements or not. In simple words, testing is executing
a system in order to identify any gaps, errors, or missing requirements in contrary to the
actual requirements.
According to ANSI/IEEE 1059 standard, Testing can be defined as - A process of analyzing a
software item to detect the differences between existing and required conditions (that is
defects/errors/bugs) and to evaluate the features of the software item.
It depends on the process and the associated stakeholders of the project(s). In the IT
industry, large companies have a team with responsibilities to evaluate the developed
software in context of the given requirements. Moreover, developers also conduct testing
which is called Unit Testing. In most cases, the following professionals are involved in
testing a system within their respective capacities −
Software Tester
Software Developer
Project Lead/Manager
End User
Different companies have different designations for people who test the software on the
basis of their experience and knowledge such as Software Tester, Software Quality
Assurance Engineer, QA Analyst, etc.
It is not possible to test the software at any time during its cycle. The next two sections
state when testing should be started and when to end it during the SDLC.
An early start to testing reduces the cost and time to rework and produce error-free
software that is delivered to the client. However in Software Development Life Cycle
(SDLC), testing can be started from the Requirements Gathering phase and continued till
the deployment of the software.
It also depends on the development model that is being used. For example, in the Waterfall
model, formal testing is conducted in the testing phase; but in the incremental model,
testing is performed at the end of every increment/iteration and the whole application is
tested at the end.
Testing is done in different forms at every phase of SDLC −
During the requirement gathering phase, the analysis and verification of
requirements are also considered as testing.
Reviewing the design in the design phase with the intent to improve the design is
also considered as testing.
Testing performed by a developer on completion of the code is also categorized as
testing.
How a software application shapes up during the development process entirely depends on
the how the software engineering team organizes work and implements various
methodologies. For an application to develop properly, it is important that all processes
incorporated during the software development are stable and sustainable. Many times
developers come under pressure as the delivery date approaches closer this often affects
the quality of the software. Rushing through the processes to finish the project on time will
only produce a software application which has no or minimal use for the customers. Hence,
work organization and planning is important and sticking to the plan is very important. The
project manager should ensure that there are no obstacles in the development process and
if at all there is an issue it must be resolved with immediate attention.
Overview of Software Testing Team
How soon and how well you can achieve your testing goals depends solely on the
capabilities of the testing team. Within the testing team itself it is important to have the
correct blend of testers who can efficiently work together to achieve the common testing
goals. While forming a team for testing, it is important to ensure that the members of the
team jointly have a combination of all the relevant domain knowledge that is required to
test the software under development.
It is very important to ensure that the software testing team has a proper structure. The
hierarchy and roles should be clearly defined and responsibilities too should be well defined
and properly distributed amongst the team members. When the team is well organized the
work can be handled well. If every team member knows what duties he or she has to
perform then they will be able to finish their duties as required well within the time limit. It
is important to keep track of the testers’ performance. It is very important to check what
kind of defects the tester is able to uncover and what kind of detects he tends to miss. This
will give you a fair idea about how serious your team is about the work.
All the team members should work together to prepare a document that clearly defines the
roles and responsibilities of all the team members. Once the document is prepared the role
of each member should be communicated clearly to everyone. Once the team members
are clear about who is going to handle which area of the project, then in case of any issue it
will be easy to determine who needs to be contacted.
Each member of the team should be provided with the necessary documents that provide
information on how the task would be organized, what approach will be followed, how
things are scheduled, how many hours have been allocated to each member and all details
related to applicable standards and quality processes.
Software Tester Role
A Software tester (software test engineer) should be capable of designing test suites and
should have the ability to understand usability issues. Such a tester is expected to have
sound knowledge of software test design and test execution methodologies. It is very
important for a software tester to have great communication skills so that he can interact
with the development team efficiently. The roles and responsibilities for a usability software
tester are as follows:
1. A Software Tester is responsible for designing testing scenarios for usability testing.
2. He is responsible for conducting the testing, thereafter analyze the results and then
submit his observations to the development team.
3. He may have to interact with the clients to better understand the product
requirements or in case the design requires any kind of modifications.
4. Software Testers are often responsible for creating test-product documentation and
also has to participate in testing related walk through.
A software tester has different sets of roles and responsibilities. He should have in depth
knowledge about software testing. He should have a good understanding about the system
which means technical (GUI or non-GUI human interactions) as well as functional product
aspects. In order to create test cases it is important that the software tester is aware of
various testing techniques and which approach is best for a particular system. He should
know what are various phases of software testing and how testing should be carried out in
each phase. The responsibilities of the software tester include:
1. Creation of test designs, test processes, test cases and test data.
2. Carry out testing as per the defined procedures.
3. Participate in walkthroughs of testing procedures.
4. Prepare all reports related to software testing carried out.
5. Ensure that all tested related work is carried out as per the defined standards
and procedures.
Software test automator or an automated test engineer should have very good
understanding of what he needs to test- GUI designs, load or stress testing. He should be
proficient in automation of software testing, and he should be able to design test suites
accordingly. A software test automator should be comfortable using various kinds of
automation tools and should be capable of upgrading their skills with changing trends. He
should also have programming skills so that he is able to write test scripts without any
issues. The responsibilities of a tester at this position are as follows:
Before getting started with testing work it is important to discuss the basic guidelines and
expectations so that there is no confusion in later stages. Criticism should be taken in a
positive sense. It is important to understand that developers and testers have a common
goal of producing high quality software. A tester is not discovering bugs to show someone
down, the idea is to learn from mistakes and avoid repeating them in future. A culture of
constructive criticism can be of great help.
Since a software tester manager has to deal with all the details of various testing activities, it
is very important for him to be in constant touch with the project manager and provide
necessary support in project planning and scheduling so that the project can be successfully
completed in time within the specified financial budget limits.
These two terms are very confusing for most people, who use them interchangeably. The
following table highlights the differences between verification and validation.
1 Verification addresses the concern: "Are you Validation addresses the concern: "Are
building it right?" you building the right thing?"
2 Ensures that the software system meets all the Ensures that the functionalities meet the
functionality. intended behavior.
3 Verification takes place first and includes the Validation occurs after verification and
checking for documentation, code, etc. mainly involves the checking of the overall
product.
By doing testing on any application, we can decrease the number of bugs, which does not
mean that the application is defect-free because sometimes the software seems to be bug-
free while performing multiple types of testing on it. But at the time of deployment in the
production server, if the end-user encounters those bugs which are not found in the testing
process.
Sometimes it seems to be very hard to test all the modules and their features with effective
and non- effective combinations of the inputs data throughout the actual testing process.
Early Testing
Here early testing means that all the testing activities should start in the early stages of the
software development life cycle's requirement analysis stage to identify the defects
because if we find the bugs at an early stage, it will be fixed in the initial stage itself, which
may cost us very less as compared to those which are identified in the future phase of the
testing process.
Defect clustering
The defect clustering defined that throughout the testing process, we can detect the
numbers of bugs which are correlated to a small number of modules. We have various
reasons for this, such as the modules could be complicated; the coding part may be
complex, and so on.
These types of software or the application will follow the Pareto Principle, which states that
we can identify that approx. Eighty percent of the complication is present in 20 percent of
the modules. With the help of this, we can find the uncertain modules, but this method has
its difficulties if the same tests are performing regularly, hence the same test will not able to
identify the new defects.
Pesticide paradox
This principle defined that if we are executing the same set of test cases again and again
over a particular time, then these kinds of the test will not be able to find the new bugs in
the software or the application. To get over these pesticide paradoxes, it is very significant
to review all the test cases frequently. And the new and different tests are necessary to be
written for the implementation of multiple parts of the application or the software, which
helps us to find more bugs.
Testing is context-dependent
Once the application is completely tested and there are no bugs identified before the
release, so we can say that the application is 99 percent bug-free. But there is the chance
when the application is tested beside the incorrect requirements, identified the flaws, and
fixed them on a given period would not help as testing is done on the wrong specification,
which does not apply to the client's requirements. The absence of error fallacy means
identifying and fixing the bugs would not help if the application is impractical and not able
to accomplish the client's requirements and needs.
S O F T WA R E T E S T I
NG(R18A1251
)
3 R D Y E A R B T E C H - 2 SEM M E C H A N I C A L E N G I N E E R I
NG
COURSE OBJECTIVES
UNIT I: Knowing the concepts of Software Engineering and software development life cycle.
UNIT II: Understanding the foundations, techniques, and tools in the area of software testing and its practice in the indu
UNIT III: Learning the functional aspect of the various testing techniques.
UNIT IV: Knowledge of the creation of test cases and usage of testing tools.
• Software
• Software Engineering
• Process Models:
• Waterfall Model
• Spiral Model
• V Model
• Prototype
• Software Testing
• Definition, Objective and limits of testing
• Testing Strategy
• Roles and Responsibilities of a Software Tester
• Independent Verification and Validation.
• Software Testing is the process of identifying the correctness and quality of software
program. The purpose is to check whether the software satisfies the specific
requirements, needs and expectations of the customer.
• In other words, testing is executing a system or application in order to find software
bugs, defects or errors.
.
• System Design:
• The requirement specifications from the first phase are studied in this phase and
system design is prepared. System Design helps in specifying hardware and system
requirements and also helps in defining overall system architecture. The software
code to be written in the next stage is created now.
• Implementation:
• With inputs from system design, the system is first developed in small programs
called units, which are integrated into the next phase. Each unit is developed and
tested for its functionality which is referred to as Unit Testing.
• Deployment of System:
• Once the functional and non functional testing is done, the product is
deployed in the customer environment or released into the market.
• Maintenance:
• This step occurs after installation, and involves making modifications to the system
or an individual component to alter attributes or improve performance. These
modifications arise either due to change requests initiated by the customer, or defects
uncovered during live use of the system. The client is provided with regular
maintenance and support for the developed software
• Planning:
• Requirements are studied and gathered in this phase. It includes
estimating the cost, schedule and resources for the spirals. As the product
matures, identification of system requirements and unit requirements are
all done in this phase.
• Risk Analysis:
• Risk Analysis includes identifying, estimating, and monitoring
technical feasibility and management risks, such as schedule
slippage and cost overrun. Once the risks are identified, risk
mitigation strategy is planned and finalized.
• Architecture Design:
• This is also referred to as High Level Design (HLD). This phase focuses on
system architecture and design. It provides overview of solution, platform, system,
product and service/process. Usually more than one technical approach is proposed
and based on the technical and financial feasibility the final decision is taken. An
integration test plan is created in order to test the pieces of the software systems
ability to work together.
• Module Design:
• The module design phase can also be referred to as low-level design. In
this phase the actual software components are designed. It defines the
actual logic for each and every component of the system. The designed
system is broken up into smaller units or modules and each of them is
explained so that the programmer can start coding directly. It is
important that the design is compatible with the other modules in the
system architecture and the other external systems.
• Validation Phases:
• In the V-Model, each stage of verification phase has a corresponding
stage in the validation phase. The following are the typical phases of
validation in the V-Model.
• Unit Testing:
• Unit tests designed in the module design phase are executed on the
code during this validation phase. Unit testing is the testing at code level
and helps eliminate bugs at an early stage. A unit is the smallest entity
which can independently exist, e.g. a program module. Unit testing
verifies that the smallest entity can function correctly when isolated
from the rest of the codes/units.
• Integration Testing:
• Integration testing is associated with the architectural design phase.
These tests verify that units created and tested independently can
coexist and communicate among themselves within the system.
• System Testing:
• System Tests Plans are developed during System Design Phase. System
Test Plans are composed by client’s business team. System Test ensures
that expectations from application developed are met. The whole
application is tested for its functionality, interdependency and
communication. User acceptance testing: Acceptance testing is
associated with the business requirement analysis phase and involves
testing the product in user environment. UAT verifies that delivered
system meets user’s requirement and system is ready for use in real
time.
ADVANTAGES OF THE SPIRAL DISADVANTAGES OF SPIRAL
MODEL MODEL
Integration testing
An integration testing focuses on the construction and design of
the software.
Validation testing
Check all the requirements like functional, behavioral and
performance requirement are validate against the construction
software.
System testing
System testing confirms all system elements and performance are tested
entirely.
TESTING STRATEGY FOR PROCEDURAL POINT
OF VIEW
• As per the procedural point of view the testing includes following
steps.
1) Unit testing
2) Integration testing
3) High-order tests
4) Validation testing
ROLES AND RESPONSIBILITIES OF A
SOFTWARE TESTER
• Reviewing software requirements and preparing test scenarios.
• Executing tests on software usability.
• Analyzing test results on database impacts, errors or bugs, and
usability.
• Preparing reports on all aspects related to the software testing
carried out and reporting to the design team.
• Interacting with clients to understand product requirements.
• Participating in design reviews and providing input on
requirements, product design, and potential problems.
VERIFICATION
VALIDATION
• Verification addresses the concern: "Are
you building it right?" • Validation addresses the concern:
"Are you building the right thing?"
• Ensures that the software system meets
all the functionality. • Ensures that the functionalities
• Verification takes place first and includes meet the intended behavior.
the checking for documentation, code, etc. • Validation occurs after verification and
• Done by developers. mainly involves the checking of the
overall product.
• It has static activities, as it includes
collecting reviews, walkthroughs, and • Done by testers.
inspections to verify a software. • It has dynamic activities, as it
• It is an objective process and no subjective includes executing the software
decision should be needed to verify a against the requirements.
software.
• It is a subjective process and
involves subjective decisions on
how well a software works.
Unit 2
Software Testing Requirement
Software Requirement
These requirements are of very much importance as any sort of compromise to them may
produce undesirable final product and may fail to meet the needs & expectations of a client
or a user. Therefore, there exists a separate phase in a SDLC to gather, study and analyse
the software requirements so as to avoid such type of circumstances.
Further, these requirements may also be categorized into multiple types, based on different
perspective. Let’s go through each of them.
Business Requirements:
These requirements are specified from the business point of view. It generally involves the
specified objectives and goals of a particular project that needs to be fulfilled. It provides an
abstract of a project. These requirements are not meant for specifying the functionalities or
technicalities of a desired software product rather it outlines a general overview of a
product, such as its primary use, why it is needed, its scope & vision, what business benefits
will be gain, intended audience or users, etc. It generally involves the participation of the
client, stakeholders, business and project managers for gathering and analyzing the business
requirements.
Through business requirements, it is easy to assess the project cost, time required, business
risks involved and many such things associated with a software development project.
System Requirements:
Functional requirements:
These requirements defines and describes the functions to be performed, and features to
be possessed by a software product. What and how does a product supposed to perform on
accepting inputs from the user, and what desirable output it should provide to the users.
These requirements should be complete and clearly well-defined so as to meet all the
specified feature and functionalities without misunderstanding or leaving the requirement
so as to achieve a desirable quality product.
Non-Functional Requirements:
Requirements other than functional requirements which are essential and contribute
towards the performance of a software product under variant type of conditions and
multiple environments are commonly known as Non-functional requirements. These
requirements are used to evaluate and assess the software product behaviour other than its
specific or desired behaviour under unexpected conditions and environment, contrary to
what is favourable for its functioning. It also covers the standards, rules and regulation that
a software product must adhere and conform to it.
These requirements are accountable for system's performance and quality and, generally
cover the following requirements and attributes:
Performance.
Response Time.
Throughput.
Utilization.
Efficiency.
Scalability.
Capacity.
Availability.
Delivery.
Reliability.
Recoverability.
Maintainability.
Serviceability.
Security.
Regulatory.
Manageability.
Environmental.
Data Integrity.
Usability.
Interoperability.
User Requirements:
Requirements generated from a users point of view and scenarios of using a software
product in a multiple manner under real environment by a targeted user to execute a
particular task, specifies the user requirements. It defines the user's expectation from a
software product. As user’s exhaustive needs may not be covered under the domain of
system requirement, it may be covered separately by business analysts through studying
and analyzing the user requirements.
These types of requirements are generally gathered and documented using use cases, user
scenarios, and user stories. These requirements are documented in a user requirement
document (URD) format by making use of narrative text and are usually signed off by the
intended users.
Functional Requirements: These are the requirements that the end user specifically
demands as basic facilities that the system should offer. All these functionalities need to
be necessarily incorporated into the system as a part of the contract. These are
represented or stated in the form of input to be given to the system, the operation
performed and the output expected. They are basically the requirements stated by the
user which one can see directly in the final product, unlike the non-functional
requirements.
Non-functional requirements: These are basically the quality constraints that the system
must satisfy according to the project contract. The priority or extent to which these
factors are implemented varies from one project to other. They are also called non-
behavioral requirements.
They basically deal with issues like:
Portability
Security
Maintainability
Reliability
Scalability
Performance
Reusability
Flexibility
Following are the differences between Functional and Non Functional Requirements
Helps you verify the functionality of Helps you to verify the performance of
the software. the software.
Example
Example 1) Emails should be sent with a
1) Authentication of user latency of no greater than 12 hours
whenever he/she logs into the from such an activity.
system. 2) The processing of each request
2) System shutdown in case of a cyber- should be done within 10
attack. seconds
3) A Verification email is sent to user 3) The site should load in 3
whenever he/she registers for the first seconds when the number of
time on some software system. simultaneous users are > 10000
Helps you to check whether the application is providing all the functionalities that
were mentioned in the functional requirement of that application
A functional requirement document helps you to define the functionality of a system
or one of its subsystems.
Functional requirements along with requirement analysis help identify missing
requirements. They help clearly define the expected system service and behavior.
Errors caught in the Functional requirement gathering stage are the cheapest to fix.
Support user goals, tasks, or activities for easy project management
Functional requirement can be expressed in Use Case form or user story as they
exhibit externally visible functional behavior.
It is very clear from the above definition that a software review is as essential as software
testing. A software review has its own significance as it provides a better view on the
developed software. It requires a team that can provide insights of the build software.
In the review, various things come to surface such as future casualties, technical content,
quality, specifications of the software, etc. This deep overview of a software gives an idea
that how will the software run and is shortcomings that are likely to occur in the near
future. It also provides an idea that this software is even worth launching. Sometimes, the
software has fewer benefits and greater number of disadvantages falling, in this condition
the software is discarded or a better development of better software is proposed.
The value of the software is defined by the reviews. The qualified team looks over the
software as per the guidelines provided to them. The specifications and standards are kept
in mind while reviewing build software. It is a healthy form of discussion between the
people who are in direct developers of the authors as well as the staff associated.
TESTING TECHNIQUES
We have various types of testing available in the market, which are used to test the
application or the software.
With the help of below image, we can easily understand the type of software testing:
Manual testing
The process of checking the functionality of an application as per the customer needs
without taking any help of automation tools is known as manual testing. While performing
the manual testing on any application, we do not need any specific knowledge of any testing
tool, rather than have a proper understanding of the product so we can easily prepare the
test document.
Manual testing can be further divided into three types of testing, which are as follows:
Automation testing is a process of converting any manual test cases into the test scripts
with the help of automation tools, or any programming language is known as automation
testing. With the help of automation testing, we can enhance the speed of our test
execution because here, we do not require any human efforts. We need to write a test
script and execute those scripts.
The box testing approach of software testing consists of black box testing and white box
testing. We are discussing here white box testing which also known as glass box is testing,
structural testing, clear box testing, open box testing and transparent box testing. It tests
internal coding and infrastructure of a software focus on checking of predefined inputs
against expected and desired outputs. It is based on inner workings of an application and
revolves around internal structure testing. In this type of testing programming skills are
required to design test cases. The primary goal of white box testing is to focus on the flow of
inputs and outputs through the software and strengthening the security of the software.
The term 'white box' is used because of the internal perspective of the system. The clear
box or white box or transparent box name denote the ability to see through the software's
outer shell into its inner workings.
Developers do white box testing. In this, the developer will test every line of the code of the
program. The developers perform the White-box testing and then send the application or
the software to the testing team, where they will perform the black box testing and verify
the application along with the requirements and identify the bugs and sends it to the
developer.
The developer fixes the bugs and does one round of white box testing and sends it to the
testing team. Here, fixing the bugs implies that the bug is deleted, and the particular feature
is working fine on the application.
Here, the test engineers will not include in fixing the defects for the following reasons:
o Fixing the bug might interrupt the other features. Therefore, the test engineer
should always find the bugs, and developers should still be doing the bug fixes.
o If the test engineers spend most of the time fixing the defects, then they may be
unable to find the other bugs in the application.
The white box testing contains various tests, which are as follows:
o Path testing
o Loop testing
o Condition testing
o Testing based on the memory perspective
o Test performance of the program
Path testing
In the path testing, we will write the flow graphs and test all independent paths. Here
writing the flow graph implies that flow graphs are representing the flow of the program
and also show how every program is added with one another as we can see in the below
image:
And test all the independent paths implies that suppose a path from main() to function G,
first set the parameters and test if the program is correct in that particular path, and in the
same way test all other paths and fix the bugs.
Loop testing
In the loop testing, we will test the loops such as while, for, and do-while, etc. and also
check for ending condition if working correctly and if the size of the conditions is enough.
For example: we have one program where the developers have given about 50,000 loops.
For example: we have one program where the developers have given about 50,000 loops.
1. {
2. while(50,000)
3. ……
4. ……
5. }
We cannot test this program manually for all the 50,000 loops cycle. So we write a small
program that helps for all 50,000 cycles, as we can see in the below program, that test P is
written in the similar language as the source code program, and this is known as a Unit test.
And it is written by the developers only.
1. Test P
2. {
3. ……
4. …… }
As we can see in the below image that, we have various requirements such as 1, 2, 3, 4.
And then, the developer writes the programs such as program 1,2,3,4 for the parallel
conditions. Here the application contains the 100s line of codes.
The developer will do the white box testing, and they will test all the five programs line by
line of code to find the bug. If they found any bug in any of the programs, they will correct
it. And they again have to test the system then this process contains lots of time and effort
and slows down the product release time.
Now, suppose we have another case, where the clients want to modify the requirements,
then the developer will do the required changes and test all four program again, which take
lots of time and efforts.
In this, we will write test for a similar program where the developer writes these test code in
the related language as the source code. Then they execute these test code, which is also
known as unit test programs. These test programs linked to the main program and
implemented as programs.
Therefore, if there is any requirement of modification or bug in the code, then the
developer makes the adjustment both in the main program and the test program and then
executes the test program.
Condition testing
In this, we will test all logical conditions for both true and false values; that is, we will verify
for both if and else condition.
For example:
1. if(condition) - true
2. {
3. …..
4. ……
5. ……
6. }
7. else - false
8. {
9. …..
10. ……
11. ……
12. }
The above program will work fine for both the conditions, which means that if the condition
is accurate, and then else should be false and conversely.
o The reuse of code is not there: let us take one example, where we have four
programs of the same application, and the first ten lines of the program are similar.
We can write these ten lines as a discrete function, and it should be accessible by the
above four programs as well. And also, if any bug is there, we can modify the line of
code in the function rather than the entire code.
o The developers use the logic that might be modified. If one programmer writes
code and the file size is up to 250kb, then another programmer could write a similar
code using the different logic, and the file size is up to 100kb.
o The developer declares so many functions and variables that might never be used
in any portion of the code. Therefore, the size of the program will increase.
For example,
1. Int a=15;
2. Int b=20;
3. String S=
"Welcome"; 4. ….
5. …..
6. …..
7. ….
8. …..
9. Int p=b;
10. Create user()
11. {
12. ……
13. ……
14. 200's line of code
15. }
In the above code, we can see that the integer a has never been called anywhere in the
program, and also the function Create user has never been called anywhere in the code.
Therefore, it leads us to memory consumption.
We cannot remember this type of mistake manually by verifying the code because of the
large code. So, we have a built-in tool, which helps us to test the needless variables and
functions. And, here we have the tool called Rational purify.
Suppose we have three programs such as Program P, Q, and R, which provides the input to
S. And S goes into the programs and verifies the unused variables and then gives the
outcome. After that, the developers will click on several results and call or remove the
unnecessary function and the variables.
This tool is only used for the C programming language and C++ programming language; for
another language, we have other related tools available in the market.
o The developer does not use the available in-built functions; instead they write the
full features using their logic. Therefore, it leads us to waste of time and also
postpone the product releases.
As we know that the developer is performing white box testing, they understand that the
code is running slow, or the performance of the program is also getting deliberate. And the
developer cannot go manually over the program and verify which line of the code is slowing
the program.
To recover with this condition, we have a tool called Rational Quantify, which resolves
these kinds of issues automatically. Once the entire code is ready, the rational quantify tool
will go through the code and execute it. And we can see the outcome in the result sheet in
the form of thick and thin lines.
Here, the thick line specifies which section of code is time-consuming. When we double-click
on the thick line, the tool will take us to that line or piece of code automatically, which is
also displayed in a different color. We can change that code and again and use this tool.
When the order of lines is all thin, we know that the presentation of the program has
enhanced. And the developers will perform the white box testing automatically because it
saves time rather than performing manually.
Test cases for white box testing are derived from the design phase of the software
development lifecycle. Data flow testing, control flow testing, path testing, branch testing,
statement and decision coverage all these techniques used by white box testing as a
guideline to create an error-free software.
White box testing follows some working steps to make testing manageable and easy to
understand what the next task to do. There are some basic steps to perform white box
testing.
o Design all test scenarios, test cases and prioritize them according to high
priority number.
o This step involves the study of code at runtime to examine the resource utilization,
not accessed areas of the code, time taken by various methods and operations and
so on.
o In this step testing of internal subroutines takes place. Internal subroutines such as
nonpublic methods, interfaces are able to handle all types of data appropriately or
not.
o This step focuses on testing of control statements like loops and conditional
statements to check the efficiency and accuracy for different data inputs.
o In the last step white box testing includes security testing to check all
possible security loopholes by looking at how the code handles security.
o White box testing is too much time consuming when it comes to large-scale
programming applications.
o White box testing is much expensive and complex.
o It can lead to production error because it is not detailed by the developers.
o White box testing needs professional programmers who have a detailed knowledge
and understanding of programming language and implementation.
Data Flow Data flow testing is a group of testing strategies that examines the
Testing control flow of programs in order to explore the sequence of variables
according to the sequence of events.
Statement Statement coverage technique is used to design white box test cases.
Testing This technique involves execution of all statements of the source code
at least once. It is used to calculate the total number of executed
statements in the source code, out of total statements present in the
source code.
Static Testing
In this section, we are going to understand Static testing, which is used to check the
application without executing the code. And we also learn about static Testing, why we use
static Testing, how to perform it, a different technique for static Testing, advantages of
static testing, and various Static Testing tools.
Static testing is a verification process used to test the application without implementing the
code of the application. And it is a cost-effective process.
To avoid the errors, we will execute Static testing in the initial stage of development
because it is easier to identify the sources of errors, and it can fix easily.
In other words, we can say that Static testing can be done manually or with the help of
tools to improve the quality of the application by finding the error at the early stage of
development; that is also called the verification process.
We can do some of the following important activities while performing static testing:
o Business requirement review
o Design review
o Code walkthroughs
o The test documentation review
Note: Static testing is performed in the white box testing phase, where the developer checks
every line of the code before giving it to the Test Engineer.
Static testing also helps us to identify those errors which may not be found by Dynamic
Testing.
We can test the various testing activities in Static Testing, which are as follows:
Static Testing?
To perform static testing, we need to follow the below steps:
Step1: To review the design of the application entirely, we will perform the inspection
process.
Step2: After that, we will use a checklist for each document under review to make sure that
all reviews are covered completely.
We can also implement several activities while performing static testing, which are
discussed in the following table:
Activities Explanation
Field Dictionary o In the field dictionary validation, we will test each field
Validation in the user interface specified to create field-level
validation test cases.
o And we can check the fields for error messages,
minimum or maximum length, list values, etc.
We required Static testing whenever we encounter the following situation while testing an
application or the software:
We need static testing to test the application as dynamic testing is time-taking process even
though the dynamic testing identifies the bug and provides some information about the
bug.
When we are developing the software, we cannot completely rely on Dynamic testing as it
finds the bugs or defects of the application/software at a later stage because it will take the
programmer's plenty of time and effort to fix the bugs.
We need to perform the static testing on the software product because dynamic testing is
more expensive than static testing. Involving the test cases is expensive in dynamic testing
as the test cases have been created in the initial stages.
And we also need to preserve the implementation and validation of the test case, which
takes lots of time from the test engineers.
Whenever we test the software, it will increase the size of the software product, which we
cannot handle because of the reduction in the productivity of code coverage.
That is why we require static testing to get free from the bugs or defects earlier in the
software development life cycle.
The following guidelines help us to perform a successful static testing process in Software
testing.
Static testing techniques offer a great way to enhance the quality and efficiency of software
development. The Static testing technique can be done in two ways, which are as follows:
o Review
o Static Analysis
Review
In static testing, the review is a technique or a process implemented to find the possible
bugs in the application. We can easily identify and eliminate faults and defects in the various
supporting documents such as SRS [Software Requirements Specifications] in the review
process.
In other words, we can say that a review in Static Testing is that where all the team
members will understand about the project's progress.
In static testing, reviews can be divided into four different parts, which are as follows:
o Informal reviews
o Walkthroughs
o Technical/peer review
o Inspections
Static Analysis
Another Static Testing technique is static analysis, which is used to contain the assessment
of the code quality, which is established by developers.
We can use the different tools to perform the code's analysis and evaluation of the same.
In other words, we can say that developers' developed code is analyzed with some tools for
structural bugs, which might cause the defects.
The static analysis will also help us to identify the below errors:
o Dead code
o Unused variables
o Endless loops
o Incorrect syntax
o Variable with undefined value
In static testing, Static Analysis can be further classified into three parts, which are as
discuss below:
Data Flow: In static analysis, the data flow is connected to the stream processing.
Control Flow: Generally, the control flow is used to specify how the commands or
instructions are implemented.
In static testing, we have several tools in the market, but here we are discussing the most
commonly used tools, which are as follow:
o CheckStyle
o SourceMeter
o Soot
CheckStyle
It is a development tool that is used to help the developers write Java code, which follows a
coding standard. The CheckStyle tool automates the process of checking Java code.
It is a highly configured tool, which is made to support almost any coding standard.
The Google Java Style, Sun code conventions are those configuration files, which is
supported by CheckStyle.
Feature of CheckStyle
SourceMeter
It is an advanced tool for the specific static source code analysis of various programming
languages such as C/C++, C#, Java, Python, and RPG projects.
With the SourceMeter tool's help, we can easily identify the vulnerable spots of a system
under development from the source code.
The free version with partial functionality of SourceMeter can be accessible for all
programming languages.
In SourceMeter, we can use the output of the analysis, the quality of the analyzed source
code to enhance and developed both the short and long term in a directed way.
Feature of SourceMeter
The most commonly used features of the SourceMeter tool are as follows:
It is a Java optimization framework, which means that it is a framework for analyzing and
transforming Java and Android applications where we can test the following aspects:
And a Soot can also produce possibly transformed code in the various output formats such
as Android bytecode, Java bytecode Jasmin, and Jimple.
Overview
o Static testing is used to identify the faults in the early stage of the Software
development cycle [SDLC].
o We have understood that Static Testing is not a replacement for dynamic Testing
because both testings identify different bug types.
o We have understood the objective of Static Testing.
o In static testing, the reviews are the productive approach to test the application
because the reviews help identify the bugs and recognize the design flaws, missing
requirements, and non-maintainable code, etc.
o We have understood several static testing tools, which help us enhance testing
performance for the software product.
Dynamic Testing
In this section, we are going to understand Dynamic testing, which is done when the code is
executed in the run time environment.
And we also learn about Dynamic testing, why we use it, how to perform it, what are a
different technique for Dynamic testing, various tools for Dynamic Testing.
Dynamic testing is one of the most important parts of Software testing, which is used to
analyse the code's dynamic behavior.
The dynamic testing is working with the software by giving input values and verifying if the
output is expected by implementing a specific test case that can be done manually or with
an automation process.
The dynamic testing can be done when the code is executed in the run time environment. It
is a validation process where functional testing [unit, integration, system, and user
acceptance testing] and non-functional testing [Performance, usability, compatibility,
recovery and security testing] are performed.
We can easily understand how to implement dynamic testing during the STLC [Software
Testing Life Cycle] if we consider the characteristics accessible by dynamic testing.
Using dynamic testing, the team can verify the software's critical features, but some of
those can be left without any assessment. And they can also affect the functioning,
reliability, and performance of the software product.
Hence, we can perform Dynamic testing to fulfill the various below aspects:
For understanding the fundamental of the software testing techniques, we have to learn
their attribute and several other components. Hence, following are some of the important
characteristics of dynamic testing:
Generally, dynamic testing follows a set process when the approach and test
implementation performances are decided, and the team can move to execute the different
testing activities.
With the help of this process, the team can find any irregularity from the approaches and
strategies and help us display all the testing steps.
In the STLC, the process of Dynamic Testing involves different functions. And all the
functions in the dynamic testing process rely on the conclusion of the earlier task in the
testing process.
The actual Dynamic Testing Process begins from Test Case Design in the software testing life
cycle. Now, we discuss each step one by one to get complete knowledge of the dynamic
testing process.
Step1: Test Case Design
In the first step of the dynamic testing process, the teams will design the test cases. Here,
we are creating those test cases that depend on the requirements and scope of testing
established before the start of the project.
In this step, we can originate the test conditions, obtain the test cases, extract the coverage
Items, and identify those features that need to be tested.
In the test environment phase, we will make sure that the testing environment
should always be parallel to the production environment because the testing is
implemented directly on the software product.
In this step, the dynamic testing process's main objective is to install the test environment,
which helps us succeed in the test machines.
Once we successfully install the test environment, we will execute those test cases prepared
in the primary stage of the dynamic testing process.
After executing the test cases, we will analyse and evaluate the outcomes derived from the
testing. And we will compare those outcomes with the expected results.
If expected and actual results are not the same according to executing, we will consider
those test cases as fail, and log the Bug in the bug repository.
After analyzing the test cases, we will be reported and recorded any bugs or defects
between the actual result and expected result to the concerned person. And the concerned
person will make sure that the issue has been solved and delivering a quality product.
Let us take one sample example where we understand how dynamic testing will woks.
So, for this, we will understand the login module of any application, such as www.
Twitter.com.
Suppose we want to create one new account with a secure password, so we need to follow
some pre-defined rules in the password field.
And the password should have eight characters long, capital letters and at least one special
character.
If we are testing this functionality, we would take all the input conditions to test this and
then verify the output.
We can also put the non-working constraints, such as input a 4-character password, and
validate if there is an error occurred or not.
Dynamic testing divided into two different testing approach, which are as follows:
o White-box testing
o Black-box testing
Both the testing techniques will help us execute the dynamic testing process efficiently as
they play an important role in verify the performance and quality of the software.
Let's understand them one by one in detail and also see the below diagram of it:
White-box testing
The word white box is used to describe the core perspective of the system. The developers
will perform the white box testing, where they will test every line of the program's code.
When the developers perform the White-box testing and then send the software application
to the testing team, the testing team will do the black box testing, validate the application
as well as the requirements. The white-box testing is further divided into data flow/control
testing.
The data flow testing is used to identify the program's test paths as per the settings of
descriptions and uses of variables in the program. And it does not relate to data flow
diagrams.
Black-box testing
The black-box testing is a testing technique where the test engineer selects a module and
gives an input value to observe its functionality and analysis of whether the function is
giving the expected output or not. If the function produced the correct output, then the
particular function will be marked as pass.
To perform black-box testing, the test engineer should have specific knowledge about the
software's requirement rather than programming knowledge of the software.
And then, they can develop the test cases to check the correctness of the software's
functionality.
Black-box testing is further classified into two types, which are as follows:
o Functional testing
o Non-function testing
Functional testing
Functional testing is one of the most important parts of black-box testing. It mainly focuses
on application specification rather than the actual code, and the test engineer will test the
program rather than the system.
The functional testing is used to validate the software application's functionality, whether
the function is working as per the requirement specification.
In functional testing, each module has been tested by giving the value, determining the
output, and verifying the actual output with the expected value.
The functional testing is classified into four different type of testing, which are as follows:
o Unit testing
o Integration testing
o System testing
o User acceptance testing
Unit testing
o The unit testing is the first level of functional testing to perform any testing on the
software application.
o We will perform the unit testing whenever the application is ready and given to the
Test engineer. He/she will start checking every component of the module or
application independently or one by one. And this process is known as components
testing.
o The primary objective to perform unit testing is to test the correctness of remote
code and validate the unit components with their performance.
Integration testing
o When we have successfully done the unit testing on the specific software, we will go
for the integration testing. The integration testing will help us to combined individual
units and tested as a group. And it is the second levelof functional testing.
o When all the components or modules are working independently, we will check
the data flow between the dependent modules, which is known as integration
testing.
o The developers and the test engineer perform the integration testing. And the main
purpose of the integration is to identify the faults in the interaction between the
integrated units.
System testing
o System testing is used to check the end-to-end flow of an application or the software
as a user.
o System testing is also known as end-to-end testing as the testing environment is
similar to the production environment.
o In the third level (system testing) of functional testing, we go through all the
necessary modules of an application and check if the end features or the
end business works fine, and test the product as a whole system.
The main objective of performing the non-functional testing is to test the software system's
reading speed according to the non-functional parameters because these parameters are
never tested before the functional testing.
Non-functional testing plays a vital role in customer satisfaction while testing the software
or the application.
It reduces the risk of production and related costs of the software, and it provides a
thorough knowledge of product behavior and used technologies.
Furthermore, the non-functional testing is divided into various parts, which can be
performed at the test level.
o Performance testing
o Usability testing
o Compatibility testing
o Recovery testing
o Security testing
Performance Testing
Usability Testing
Compatibility testing
Recovery testing
o In recovery testing, we can verify how well a system can recover from
hardware failures and crashes.
o It reproduced the failure modes or essential producing failures in a
controlled environment.
o The recovery testing is performed to confirm that a system is fault-tolerant and can
improve well from failures.
Security testing
o The security testing is used to discover the weaknesses, risks, or threats in the
software application and help us stop the nasty attack from outsiders and ensure our
software applications' security.
o The main purpose of security testing is to identify all the possible uncertainties and
vulnerabilities of the application so that the software does not stop working.
Therefore, below we listed some of the advantages and disadvantages of dynamic testing:
Advantages
Disadvantages
Overview
o After understood the dynamic testing above, we can easily say that the importance
of dynamic testing is massive in the software testing life cycle (STLC).
o Dynamic testing is used to perform the dynamic behavior of the code.
o We have understood the process of dynamic Testing and the various types of
dynamic testing.
o In dynamic testing, we can directly implement the software tests to verify
the functional performance, behavior, reliability, and other significant features of the
software.
o We have understood the advantages and disadvantages of dynamic testing.
Statement coverage is one of the widely used software testing. It comes under white box
testing.
Statement coverage technique is used to design white box test cases. This technique
involves execution of all statements of the source code at least once. It is used to calculate
the total number of executed statements in the source code out of total statements
present in the source code.
Statement coverage derives scenario of test cases under the white box testing process
which is based upon the structure of the code.
In white box testing, concentration of the tester is on the working of internal source code
and flow chart or flow graph of the code.
Generally, in the internal source code, there is a wide variety of elements like operators,
methods, arrays, looping, control statements, exception handlers, etc. Based on the input
given to the program, some code statements are executed and some may not be
executed. The goal of statement coverage technique is to cover all the possible executing
statements and path lines in the code.
Here, we are taking source code to create two different scenarios according to input values
to check the percentage of statement coverage for each scenario.
So, this is the basic structure of the program, and that is the task it is going to do.
Now, let's see the two different scenarios and calculation of the percentage of Statement
Coverage for given source code.
Scenario 1:
If a = 5, b = 4
In scenario 1, we can see the value of sum will be 9 that is greater than 0 and as per the
condition result will be "This is a positive result." The statements highlighted in yellow color
are executed statements of this scenario.
To calculate statement coverage of the first scenario, take the total number of statements
that is 7 and the number of used statements that is 5.
Likewise, in scenario 2,
Scenario 2:
If A = -2, B = -7
In scenario 2, we can see the value of sum will be -9 that is less than 0 and as per the
condition, result will be "This is a negative result." The statements highlighted in yellow
color are executed statements of this scenario.
To calculate statement coverage of the first scenario, take the total number of statements
that is 7 and the number of used statements that is 6.
Total number of statements = 7
Number of executed statements = 6
But, we can see all the statements are covered in both scenario and we can consider that
the overall statement coverage is 100%.
So, the statement coverage technique covers dead code, unused code, and branches.
Decision coverage technique comes under white box testing which gives decision coverage
to Boolean values. This technique reports true and false outcomes of Boolean expressions.
Whenever there is a possibility of two or more outcomes from the statements like do while
statement, if statement and case statement (Control flow statements), it is considered as
decision point because there are two outcomes either true or false.
Decision coverage covers all possible outcomes of each and every Boolean condition of the
code by using control flow graph or chart.
Generally, a decision point has two decision values one is true, and another is false that's
why most of the times the total number of outcomes is two. The percent of decision
coverage can be found by dividing the number of exercised outcome with the total number
of outcomes and multiplied by 100.
In this technique, it is tough to get 100% coverage because sometimes expressions get
complicated. Due to this, there are several different methods to report decision coverage.
All these methods cover the most important combinations and very much similar to decision
coverage. The benefit of these methods is enhancement of the sensitivity of control flow.
1. Test (int a)
2. {
3. If(a>4)
4. a=a*3
5. Print (a)
6. }
Scenario 1:
Value of a is 7 (a=7)
The code highlighted in yellow is executed code. The outcome of this code is "True" if
condition (a>4) is checked.
Scenario 2:
Value of a is 3 (a=3)
The code highlighted in yellow will be executed. The outcome of this code is ?False? if
condition (a>4) is checked.
1 3 3 50%
2 7 21 50%
Basis path testing, a structured testing or white box testing technique used for designing
test cases intended to examine all possible paths of execution at least once. Creating and
executing tests for all possible paths results in 100% statement coverage and 100% branch
coverage.
Example:
2 for i = 1 to
array_size 3 if
( array[i] == value ) 4
location = i;
end if;
end
for;
5 for i = location to
array_size 6 array[i] =
array[i+1];
end for;
Steps to Calculate the independent paths
Step 1 : Draw the Flow Graph of the Function/Program under consideration as shown
below:
Path 1: 1 - 2 - 5 - 7
Path 2: 1 - 2 - 5 - 6 - 7
Path 3: 1 - 2 - 3 - 2 - 5 - 6 - 7
Path 4: 1 - 2 - 3 - 4 - 2 - 5 - 6 - 7
Control flow testing is a testing technique that comes under white box testing. The aim of
this technique is to determine the execution order of statements or instructions of the
program through a control structure. The control structure of a program is used to develop
a test case for the program. In this technique, a particular part of a large program is selected
by the tester to set the testing path. It is mostly used in unit testing. Test cases represented
by the control graph of the program.
Control Flow Graph is formed from the node, edge, decision node, junction node to specify
all possible execution path.
1. Node
2. Edge
3. Decision Node
4. Junction node
Node
Nodes in the control flow graph are used to create a path of procedures. Basically, it
represents the sequence of procedures which procedure is next to come so, the tester can
determine the sequence of occurrence of procedures.
We can see below in example the first node represent the start procedure and the next
procedure is to assign the value of n after assigning the value there is decision node to
decide next node of procedure as per the value of n if it is 18 or more than 18 so Eligible
procedure will execute otherwise if it is less than 18 Not Eligible procedure executes. The
next node is the junction node, and the last node is stop node to stop the procedure.
Edge
We can see below in example all arrows are used to link the nodes in an appropriate
direction.
Decision node
Decision node in the control flow graph is used to decide next node of procedure as per the
value.
We can see below in example decision node decide next node of procedure as per the value
of n if it is 18 or more than 18 so Eligible procedure will execute otherwise if it is less than
18, Not Eligible procedure executes.
Junction node
Junction node in control flow graph is the point where at least three links meet.
Example
1. public class VoteEligiblityAge{
2.
3. public static void main(String []args){
4. int n=45;
5. if(n>=18)
6. {
7. System.out.println("You are eligible for voting");
8. } else
9. {
10. System.out.println("You are not eligible for voting");
11. }
12. }
13. }
Program for this scenario is written above, and the control flow graph is designed for the
testing purpose.
In the control flow graph, start, age, eligible, not eligible and stop are the nodes, n>=18 is a
decision node to decide which part (if or else) will execute as per the given value.
Connectivity of the eligible node and not eligible node is there on the stop node.
Test cases are designed through the flow graph of the programs to determine the execution
path is correct or not. All nodes, junction, edges, and decision are the essential parts to
design test cases.
Cyclomatic Complexity
McCabe proposed the cyclomatic number, V (G) of graph theory as an indicator of software
complexity. The cyclomatic number is equal to the number of linearly independent paths
through a program in its graphs representation. For a program control graph G, cyclomatic
number, V (G), is given as:
V (G) = E - N + 2 * P
Mutation Testing
Mutation testing is a white box method in software testing where we insert errors purposely
into a program (under test) to verify whether the existing test case can detect the error or
not. In this testing, the mutant of the program is created by making some modifications to
the original program.
The primary objective of mutation testing is to check whether each mutant created an
output, which means that it is different from the output of the original program. We will
make slight modifications in the mutant program because if we change it on a massive scale
than it will affect the overall plan.
When we detected the number of errors, it implies that either the program is correct or the
test case is inefficient to identify the fault.
Mutation testing purposes is to evaluate the quality of the case that should be able to fail
the mutant code hence this method is also known as Fault-based testing as it used to
produce an error in the program and that why we can say that the mutation testing is
performed to check the efficiency of the test cases.
What is mutation?
The mutation is a small modification in a program; these minor modifications are planned to
typical low-level errors which are happened at the time of coding process.
Generally, we deliberate the mutation operators in the form of rules which match the data
and also generate some efficient environment to produce the mutant.
Mutation testing can be classified into three parts, which are as follows:
o Decision mutations
o value mutations
o Statement mutations
Decision mutations
In this type of mutation testing, we will check the design errors. And here, we will do the
modification in arithmetic and logical operator to detect the errors in the program.
o plus(+)→ minus(-)
o asterisk(*)→ double asterisk(**)
o plus(+)→incremental operator(i++)
Value mutations
In this, the values will modify to identify the errors in the program, and generally, we will
change the following:
For Example:
Statement Mutations
Statement mutations means that we can do the modifications into the statements by
removing or replacing the line as we see in the below example:
In the above case, we have replaced the statement r=15 by s=15, and r=25 by s=25.
o In this, firstly, we will add the errors into the source code of the program by
producing various versions, which are known mutants. Here every mutant having
the one error, which leads the mutant kinds unsuccessful and also validates the
efficiency of the test cases.
o After that, we will take the help of the test cases in the mutant program and the
actual application will find the errors in the code.
o Once we identify the faults, we will match the output of the actual code and
mutant code.
o After comparing the output of both actual and mutant programs, if the results are
not matched, then the mutant is executed by the test cases. Therefore the test
case
has to be sufficient for identifying the modification between the actual program and
the mutant program.
o And if the actual program and the mutant program produced the exact result,
then the mutant is saved. And those cases are more active test cases because it
helps us to execute all the mutants.
Advantages
Disadvantages
o This testing is a bit of time taking and costlier process because we have many mutant
programs that need to be created.
o The mutation testing is not appropriate for Black-box testing as it includes the
modification in the source code.
o Every mutation will have the same number of test cases as compare to the actual
program. Therefore the significant number of the mutant program may need to
be tested beside the real test suite.
o As it is a tedious process, so we can say that this testing requires the automation
tools to test the application.
Black box testing is a technique of software testing which examines the functionality of
software without peering into its internal structure or coding. The primary source of black
box testing is a specification of requirements that is stated by the customer.
In this method, tester selects a function and gives input value to examine its functionality,
and checks whether the function is giving expected output or not. If the function produces
correct output, then it is passed in testing, otherwise failed. The test team reports the result
to the development team and then tests the next function. After completing testing of all
functions if there are severe problems, then it is given back to the development team for
correction.
Test procedure
The test procedure of black box testing is a kind of process in which the tester has
specific knowledge about the software's work, and it develops test cases to check the
accuracy of the software's functionality.
It does not require programming knowledge of the software. All test cases are designed by
considering the input and output of a particular function.A tester knows about the definite
output of a particular input, but not about how the result is arising. There are various
techniques used in black box testing for testing like decision table technique, boundary
value analysis technique, state transition, All-pair testing, cause-effect graph technique,
equivalence partitioning technique, error guessing technique, use case technique and user
story technique. All these techniques have been explained in detail within the tutorial.
Test cases
Test cases are created considering the specification of the requirements. These test cases
are generally created from working descriptions of the software including requirements,
design parameters, and other specifications. For the testing, the test designer selects both
positive test scenario by taking valid input values and adverse test scenario by taking invalid
input values to determine the correct output. Test cases are mainly designed for functional
testing but can also be used for non-functional testing. Test cases are designed by the
testing team, there is not any involvement of the development team of software.
State Transition State Transition Technique is used to capture the behavior of the
Technique software application when different input values are given to the
same function. This applies to those types of applications that
provide the specific number of attempts to access the application.
All-pair Testing All-pair testing Technique is used to test all the possible discrete
Technique combinations of values. This combinational method is used for
testing the application that uses checkbox input, radio button
input, list box, text box, etc.
Use Case Use case Technique used to identify the test cases from the
Technique beginning to the end of the system as per the usage of the system.
By using this technique, the test team creates a test scenario that
can exercise the entire software based on the functionality of each
function from start to end.
Boundary value analysis is one of the widely used case design technique for black box
testing. It is used to test boundary values because the input values near the boundary have
higher chances of error.
Whenever we do the testing by boundary value analysis, the tester focuses on, while
entering boundary value whether the software is producing correct output or not.
Boundary values are those that contain the upper and lower limit of a variable. Assume that,
age is a variable of any function, and its minimum value is 18 and the maximum value is 30,
both 18 and 30 will be considered as boundary values.
The basic assumption of boundary value analysis is, the test cases that are created using
boundary values are most likely to cause an error.
There is 18 and 30 are the boundary values that's why tester pays more attention to these
values, but this doesn't mean that the middle values like 19, 20, 21, 27, 29 are ignored. Test
cases are developed for each and every value of the range.
Testing of boundary values is done by making valid and invalid partitions. Invalid partitions
are tested because testing of output in adverse condition is also essential.
Imagine, there is a function that accepts a number between 18 to 30, where 18 is the
minimum and 30 is the maximum value of valid partition, the other values of this partition
are 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 and 29. The invalid partition consists of the numbers
which are less than 18 such as 12, 14, 15, 16 and 17, and more than 30 such as 31, 32, 34,
36 and 40. Tester develops test cases for both valid and invalid partitions to capture the
behavior of the system on different input conditions.
The software system will be passed in the test if it accepts a valid number and gives the
desired output, if it is not, then it is unsuccessful. In another scenario, the software system
should not accept invalid numbers, and if the entered number is invalid, then it should
display error massage.
If the software which is under test, follows all the testing guidelines and specifications then
it is sent to the releasing team otherwise to the development team to fix the defects.
Equivalence Partitioning Technique
Equivalence partitioning is a technique of software testing in which input data is divided into
partitions of valid and invalid values, and it is mandatory that all partitions must exhibit the
same behavior. If a condition of one partition is true, then the condition of another equal
partition must also be true, and if a condition of one partition is false, then the condition of
another equal partition must also be false. The principle of equivalence partitioning is, test
cases should be designed to cover each partition at least once. Each value of every equal
partition must exhibit the same behavior as other.
The equivalence partitions are derived from requirements and specifications of the
software. The advantage of this approach is, it helps to reduce the time of testing due to a
smaller number of test cases from infinite to finite. It is applicable at all levels of the testing
process.
Assume that there is a function of a software application that accepts a particular number of
digits, not greater and less than that particular number. For example, an OTP number which
contains only six digits, less or more than six digits will not be accepted, and the application
will redirect the user to the error page.
In both examples, we can see that there is a partition of two equally valid and invalid
partitions, on applying valid value such as OTP of six digits in the first example and mobile
number of 10 digits in the second example, both valid partitions behave same, i.e.
redirected to the next page.
Another two partitions contain invalid values such as 5 or less than 5 and 7 or more than 7
digits in the first example and 9 or less than 9 and 11 or more than 11 digits in the second
example, and on applying these invalid values, both invalid partitions behave same, i.e.
redirected to the error page.
We can see in the example, there are only three test cases for each example and that is also
the principal of equivalence partitioning which states that this method intended to reduce
the number of test cases.
Condition1
If the requirement is a range of values, then derive the test case for one valid and two
invalid inputs.
Here, the Range of values implies that whenever we want to identify the range values, we
go for equivalence partitioning to achieve the minimum test coverage. And after that, we go
for error guessing to achieve maximum test coverage.
According to pressman:
For example, the Amount of test field accepts a Range (100-400) of values:
Whenever the requirement is Range + criteria, then divide the Range into the internals and
check for all these values.
For example:
In the below image, the pressman technique is enough to test for an age text field for one
valid and two invalids. But, if we have the condition for insurance of ten years and above
are required and multiple policies for various age groups in the age text field, then we need
to use the practice method.
Condition2
If the requirement is a set of values, then derive the test case for one valid and two
invalid inputs.
Here, Set of values implies that whenever we have to test a set of values, we go for one
positive and two negative inputs, then we moved for error guessing, and we also need to
verify that all the sets of values are as per the requirement.
Example 1
Example 2
if we are doing online shopping, mobile phone product, and the different Product ID -
1,4,7,9
And if we give the product id as 4, it will be accepted, and it is one valid value, and if we
provide the product id as 5 and phone cover, it will not be accepted as per the requirement,
and these are the two invalid values.
Condition 3
If the requirement id Boolean (true/false), then derive the test case for both true/false
values.
The Boolean value can be true and false for the radio button, checkboxes.
For example
Note:
Here, we are testing the application by deriving the below inputs values:
When the pressman technique is used, the first two conditions are tested, but if we use the
practice method, all three conditions are covered.
We don't need to use the practice approach for all applications. Sometime we will use the
pressman method also.
But, if the application has much precision, then we go for the practice method.
If we want to use the practice method, it should follow the below aspects:
o It should be product-specific
o It should be case-specific
o The number of divisions depends on the precision( 2% and 3 %
Advantages Disadvantages
We can achieve the Minimum test This technique will not consider the condition for
coverage boundary value analysis.
It helps to decrease the general The test engineer might assume that the output
test execution time and also for all data set is right, which leads to the
reduce the set of test data. problem during the testing process.
Cause-effect graph comes under the black box testing technique which underlines the
relationship between a given result and all the factors affecting the result. It is used to write
dynamic test cases.
The dynamic test cases are used when code works dynamically based on user input. For
example, while using email account, on entering valid email, the system accepts it but,
when you enter invalid email, it throws an error message. In this technique, the input
conditions are assigned with causes and the result of these input conditions with effects.
The main advantage of cause-effect graph testing is, it reduces the time of test execution
and cost.
This technique aims to reduce the number of test cases but still covers all necessary test
cases with maximum coverage to achieve the desired application quality.
AND - E1 is an effect and C1 and C2 are the causes. If both C1 and C2 are true, then effect E1
will be true.
The character in column 1 should be either A or B and in the column 2 should be a digit. If
both columns contain appropriate values then update is made. If the input of column 1 is
incorrect, i.e. neither A nor B, then message X will be displayed. If the input in column 2 is
incorrect, i.e. input is not a digit, then message Y will be displayed.
o A file must be updated, if the character in the first column is either "A" or "B" and in
the second column it should be a digit.
o If the value in the first column is incorrect (the character is neither A nor B) then
massage X will be displayed.
o If the value in the second column is incorrect (the character is not a digit)
then massage Y will be displayed.
Now, we are going to make a Cause-Effect graph for the above situation:
Causes are:
o C1 - Character in column 1 is A
o C2 - Character in column 1 is B
o C3 - Character in column 2 is digit!
Effects:
Effect E2 - Displays Massage X - The logic for the existence of effect E2 is "NOT C1 AND NOT
C2" that means both C1 (Character in column 1 should be A) and C2 (Character in column 1
should be B) should be false. In other words, for the existence of effect E2 the character in
column 1 should not be either A or B. We can see in the graph, C1 OR C2 is connected
through NOT logic with effect E2.
Effect E3 - Displays Massage Y- The logic for the existence of effect E3 is "NOT C3" that
means cause C3 (Character in column 2 is a digit) should be false. In other words, for the
existence of effect E3, the character in column 2 should not be a digit. We can see in the
graph, C3 is connected through NOT logic with effect E3.
So, it is the cause-effect graph for the given situation. A tester needs to convert causes and
effects into logical statements and then design cause-effect graph. If function gives output
(effect) according to the input (cause) so, it is considered as defect free, and if not doing so,
then it is sent to the development team for the correction.
Conclusion
Decision table technique is one of the widely used case design techniques for black box
testing. This is a systematic approach where various input combinations and their respective
system behavior are captured in a tabular form.
That's why it is also known as a cause-effect table. This technique is used to pick the test
cases in a systematic manner; it saves the testing time and gives good coverage to the
testing area of the software application.
Decision table technique is appropriate for the functions that have a logical relationship
between two and more than two inputs.
This technique is related to the correct combination of inputs and determines the result of
various combinations of input. To design the test cases by decision table technique, we need
to consider conditions as input and actions as output.
Most of us use an email account, and when you want to use an email account, for this you
need to enter the email and its associated password.
If both email and password are correctly matched, the user will be directed to the email
account's homepage; otherwise, it will come back to the login page with an error message
specified with "Incorrect Email" or "Incorrect Password."
Now, let's see how a decision table is created for the login function in which we can log in by
using email and password. Both the email and the password are the conditions, and the
expected result is action.
In the table, there are four conditions or test cases to test the login function. In the first
condition if both email and password are correct, then the user should be directed to
account's Homepage.
In the second condition if the email is correct, but the password is incorrect then the
function should display Incorrect Password. In the third condition if the email is incorrect,
but the password is correct, then it should display Incorrect Email.
Now, in fourth and last condition both email and password are incorrect then the function
should display Incorrect Email.
In this example, all possible conditions or test cases have been included, and in the same
way, the testing team also includes all possible test cases so that upcoming bugs can be
cured at testing level.
In order to find the number of all possible conditions, tester uses 2n formula where n
denotes the number of inputs; in the example there is the number of inputs is 2 (one is true
and second is false).
While using the decision table technique, a tester determines the expected output, if the
function produces expected output, then it is passed in testing, and if not then it is failed.
Failed software is sent back to the development team to fix the defect.
The general meaning of state transition is, different forms of the same situation, and
according to the meaning, the state transition method does the same. It is used to capture
the behavior of the software application when different input values are given to the same
function.
We all use the ATMs, when we withdraw money from it, it displays account details at last.
Now we again do another transaction, then it again displays account details, but the details
displayed after the second transaction are different from the first transaction, but both
details are displayed by using the same function of the ATM. So the same function was used
here but each time the output was different, this is called state transition. In the case of
testing of a software application, this method tests whether the function is following state
transition specifications on entering different inputs.
This applies to those types of applications that provide the specific number of attempts to
access the application such as the login function of an application which gets locked after
the specified number of incorrect attempts. Let's see in detail, in the login function we use
email and password, it gives a specific number of attempts to access the application, after
crossing the maximum number of attempts it gets locked with an error message.
Let see in the diagram:
S4 Home Page
S5 Error Page
In the above state transition table, we see that state S1 denotes first login attempt. When
the first attempt is invalid, the user will be directed to the second attempt (state S2). If the
second attempt is also invalid, then the user will be directed to the third attempt (state S3).
Now if the third and last attempt is invalid, then the user will be directed to the error page
(state S5).
But if the third attempt is valid, then it will be directed to the homepage (state S4).
S4 Home Page
S5 Error Page
By using the above state transition table we can perform testing of any software application.
We can make a state transition table by determining desired output, and then exercise the
software system to examine whether it is giving desired output or not.
All-pairs Testing
All-pairs testing technique is also known as pairwise testing. It is used to test all the possible
discrete combinations of values. This combinational method is used for testing the
application that uses checkbox input, radio button input (radio button is used when you
have to select only one option for example when you select gender male or female, you can
select only one option), list box, text box, etc.
Suppose, you have a function of a software application for testing, in which there are 10
fields to input the data, so the total number of discrete combinations is 10 ^ 10 (100 billion),
but testing of all combinations is complicated because it will take a lot of time.
Assume that there is a function with a list box that contains 10 elements, text box that can
accept 1 to 100 characters, radio button, checkbox and OK button.
The input values are given below that can be accepted by the fields of the given function.
1. Check Box = 2
2. List Box = 10
3. Radio Button = 2
4. Text Box = 100
5. Total number of test cases =
2*10*2*100 6. = 4000
The total number of test cases, including negative test cases, is 4000.
Testing of 4000 positive and negative test cases, is a very long and time-consuming process.
Therefore, the task of the testing team is to reduce the number of test cases, to do this, the
testing team considers the list box values in such a way that the first value is 0, and the
other value can be any numeric number, neither positive nor negative. Ten values are now
converted into 2 values.
Values of checkbox and radio button cannot be reduced because each has a combination of
only 2 values. At last, the value of the text box is divided into three input categories valid
integer, invalid integer, and alpha-special character.
Now, the task is to make combinations for all pair technique, into which each column should
have an equal number of values, and the total value should be equal to 24.
In order to make text box column, put the most common input on the first place that is a
valid integer, on the second place put the second most common input that is an invalid
integer, and at the last place put the least common input that is an Alpha Special Character.
Then start filling the table, the first column is a text box with three values, the next
column is a list box that has 2 values, the third column is a checkbox that has 2 values, and
the last one is a radio button that also has 2 values.
AlphaSpecialCharacter 0 Check ON
In the table, we can see that the conventional software method results in 24 test cases
instead of 4000 cases, and the pairwise testing method only in just 6 pair test cases.
The use case is functional testing of the black box testing used to identify the test cases
from the beginning to the end of the system as per the usage of the system. By using this
technique, the test team creates a test scenario that can exercise the entire software based
on the functionality of each function from start to end.
It is a graphic demonstration of business needs, which describe how the end-user will
cooperate with the software or the application. The use cases provide us all the possible
techniques of how the end-user uses the application as we can see in the below image, that
how the use case will look like:
In the above image, we can see that a sample of a use case where we have a requirement
related to the customer requirement specification (CRS).
And here, Admin has access to all the six features, the Paid user has access to the three
features and for the Free user, there is no access provided to any of the features.
Post-condition→ no features
The client provides the customer requirement specification for the application, then the
development team will write the use case according to the CRS, and the use case is sent to
the customer for their review.
If the client approves it, then the approved use case is sent to the development team for
further design and coding process and these approved use case is also sent to the testing
team, so they can start writing the test plan and later on start writing the test cases for the
different features of the software.
In the below scenario, there is a tester who represents the user to use the functions of
a system one by one. In this scenario, there is an actor who represents the user to use
the functions of a software system.
o The user does login for the authentication of the actual user.
o The system checks ID and password with the database to ensure that whether it is
a valid user or not.
o If the verification succeeds, the server connects the user to the account page,
otherwise returns to the login page.
o In the account page, there are several options because the examiner is checking
the money transfer option; the user goes into the money transfer option.
o After successful completion of this step, the user enters the account number in
which he wants to transfer money. The user also need to enter other details
like bank name, amount, IFSC code, home branch, etc.
In the last step, if there is a security feature that includes verification of the ATM card
number and PIN, then enter the ATM card number, PIN and other required details.
If the system is successfully following all the steps, then there is no need to design test cases
for this function. By describing the steps to use, it is easy to design test cases for software
systems.
The developers use the standard symbols to write a use case so that everyone will
understand easily. They will use the Unified modeling language (UML) to create the use
cases.
There are various tools available that help to write a use case, such as Rational Rose. This
tool has a predefined UML symbols, we need to drag and drop them to write a use case, and
the developer can also use these symbols to develop the use case.
The use case technique gives us some features which help us to create an application.
Following are the benefits of using the use case technique while we are developing the
product:
o The use case is used to take the functional needs of the system.
o These are the classification of steps, which describe the connections between the
user and its actions.
o It starts from an elementary view where the system is created first and
primarily used for its users.
o It is used to determine the complete analyses, which help us to achieve
the complication, and then it focuses on the one detailed features at a
time.
UNIT IV
TESTING TYPES
Unit Testing
Unit testing involves the testing of each unit or an individual component of the software application. It
is the first level of functional testing. The aim behind unit testing is to validate unit components with its
performance.
A unit is a single testable part of a software system and tested during the development phase of the
application software.
The purpose of unit testing is to test the correctness of isolated code. A unit component is an
individual function or code of the application. White box testing approach used for unit testing and
usually done by the developers.
Smoke Testing
Smoke Testing comes into the picture at the time of receiving build software from the development
team. The purpose of smoke testing is to determine whether the build software is testable or not. It is
done at the time of "building software." This process is also known as "Day 0".
It is a time-saving process. It reduces testing time because testing is done only when the key features of
the application are not working or if the key bugs are not fixed. The focus of Smoke Testing is on the
workflow of the core and primary functions of the application.
Testing the basic & critical feature of an application before doing one round of deep, rigorous testing
(before checking all possible positive and negative values) is known as smoke testing.
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.
Unit testing uses modules for testing purpose, and these modules are combined and tested in integration
testing. The Software is developed with a number of software modules that are coded by different
coders or programmers. The goal of integration testing is to check the correctness of communication
among all the modules.
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.
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). The
software is developed in units and then interfaced with other software and hardware to create a complete
computer system. In other words, a computer system consists of a group of software to perform the
various tasks, but only software cannot perform the task; for that software must be interfaced with
compatible hardware. System testing is a series of different type of tests with the purpose to exercise
and examine the full working of an integrated software computer system against requirements.
To check the end-to-end flow of an application or the software as a user is known as System testing. In
this, we navigate (go through) all the necessary modules of an application and check if the end features or
the end business works fine, and test the product as a whole system.
It is end-to-end testing where the testing environment is similar to the production environment.
Performance Testing
In this section, we will learn about performance testing, why we need it, types of performance testing, and
the performance testing process.
Generally, this testing defines how quickly the server responds to the user's request.
While doing performance testing on the application, we will concentrate on the various factors
like Response time, Load, and Stability of the application.
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.
We will do performance testing once the software is stable and moved to the production, and it may be
accessed by the multiple users concurrently, due to this reason, some performance issues may occur. To
avoid these performance issues, the tester performs one round of performance testing.
Since it is non-functional testing which doesn't mean that we always use performance testing, we only go
for performance testing when the application is functionally stable.
Load testing
Stress testing
Scalability testing
Stability testing
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
Checking the performance of an application by increasing or decreasing the load in particular scales (no of
a user) is known as scalability testing. Upward scalability and downward scalability testing are called
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.
Let us take one example where we will test the behavior of an application where the desired load is
either less than 1000 or equal to 1000 users.
In the below image, we can see that the 100 up users are increased continuously to check the maximum
load, which is also called upward scalability testing.
o Scenario1: When we have the 1000 users as desired load, and the 2.7/sec is goal time, these
scenarios will pass while performing the load test because in load testing, we will concentrate on
the no. of users, and as per the requirement it is equal to 1000 user.
o Scenario2: In the next scenario, we will increase the desired load by 100 users, and goal time will
go up to 3.5\sec. This scenario will pass if we perform stress testing because here, the actual load is
greater than (1100) the desired load (1000).
o Scenario3: In this, if we increase the desired load three times as
1200 → 3.5\sec: [it is not less than or equal to the desired load that's why it will Fail]
1300 → 4\sec: [it is not less than or equal to the desired load. i.e., Fail]
1400 → Crashed
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.
It is a testing procedure, which is used to define that the data will be safe and also continue the working
process of the software.
Availability
Integrity
Authorization
Confidentiality
Authentication
Non-repudiation
Availability
In this, the data must be retained by an official person, and they also guarantee that the data and statement
services will be ready to use whenever we need it.
Integrity
In this, we will secure those data which have been changed by the unofficial person. The primary objective
of integrity is to permit the receiver to control the data that is given by the system.
The integrity systems regularly use some of the similar fundamental approaches as confidentiality
structures. Still, they generally include the data for the communication to create the source of an
algorithmic check rather than encrypting all of the communication. And also verify that correct data is
conveyed from one application to another.
Authorization
It is the process of defining that a client is permitted to perform an action and also receive the services. The
example of authorization is Access control.
Confidentiality
It is a security process that protracts the leak of the data from the outsider's because it is the only way
where we can make sure the security of our data.
Authentication
The authentication process comprises confirming the individuality of a person, tracing the source of a
product that is necessary to allow access to the private information or the system.
Non- repudiation
It is used as a reference to the digital security, and it a way of assurance that the sender of a message cannot
disagree with having sent the message and that the recipient cannot repudiate having received the message.
The non-repudiation is used to ensure that a conveyed message has been sent and received by the person
who claims to have sent and received the message.
While performing the security testing on the web application, we need to concentrate on the following
areas to test the application:
System software security
In this, we will evaluate the vulnerabilities of the application based on different software such
as Operating system, Database system, etc.
Network security
In this, we will check the weakness of the network structure, such as policies and
We will do the server-side application security to ensure that the server encryption and its tools are
sufficient to protect the software from any disturbance.
In this, we will make sure that any intruders cannot operate on any browser or any tool which is used by
customers.
As per Open Source Security Testing techniques, we have different types of security testing which as
follows:
Security Scanning
Risk Assessment
Vulnerability Scanning
Penetration testing
Security Auditing
Ethical hacking
Posture Assessment
Usability Testing
When we use usability testing, it makes sure that the developed software is easy while using the system
without facing any problem and makes end-user life easier.
Usability testing is testing, which checks the defect in the end-user interaction of software or the product.
Usability testing can be done at the design stage of the Software development life cycle (SDLC), and
that helps us to get more clarity of the user's needs.
Easy to understand
Easy to access
Look & feel
Faster to Access
Effective Navigation
Good Error Handling
Easy to understand
Easy to Access
Easy to Access
The look and feel of the application should be excellent and attractive to get the user's interest.
The GUI of the software should be good because if the GUI is not well, the user may be lost
his/her interest while using the application or the software.
The quality of the product is up to the mark as given by the client.
Faster to Access
The software should be faster while accessing, which means that the response time of the
application is quick.
If the response time is slow, it might happen that the user got irritated. We have to ensure that
our application will be loaded within 3 to 6 seconds of the response time.
Effective Navigation
Handling of error at a coding level, make sure that the software or the application is bug-free
and robust.
By showing the correct error message will help to enhance the user experience and usability of
the application.
Let us see some examples, where we understand the use of usability testing.
Example1:
We are taking one banking application where we produce the application for the manager.
Compatibility testing
Checking the functionality of an application on different software, hardware platforms, network, and
browsers is known as compatibility testing.
Generally, we go for compatibility testing, only when the application or software is functionally stable.
Types of Compatibility testing
Software
Hardware
Network
Mobile
Software
Here, software means different operating systems (Linux, Window, and Mac) and also check the software
compatibility on the various versions of the operating systems like Win98, Window 7, Window 10, Vista,
Window XP, Window 8, UNIX, Ubuntu, and Mac.
And, we have two types of version compatibility testing, which are as follows:
Forward Compatibility Testing: Test the software or application on the new or latest versions.
For example: Latest Version of the platforms (software)
Win 7 → Win 8 → Win 8.1 → Win 10
Backward Compatibility Testing: Test the software or application on the old or previous
versions.
For example:Window XP → Vista → Win 7 → Win 8 → Win 8.1
And different browsers like Google Chrome, Firefox, and Internet Explorer, etc.
Hardware
The application is compatible with different sizes such as RAM, hard disk, processor, and the graphic card,
etc.
Mobile
Check that the application is compatible with mobile platforms such as iOS, Android, etc.
Network
Checking the compatibility of the software in the different network parameters such as operating speed,
bandwidth, and capacity.
AdHoc Testing
When a software testing performed without proper planning and documentation, it is said to be Adhoc
Testing. Such kind of tests are executed only once unless we uncover the defects.
Adhoc Tests are done after formal testing is performed on the application. Adhoc methods are the least
formal type of testing as it is NOT a structured approach. Hence, defects found using this method are hard
to replicate as there are no test cases aligned for those scenarios.
Testing is carried out with the knowledge of the tester about the application and the tester tests randomly
without following the specifications/requirements. Hence the success of Adhoc testing depends upon the
capability of the tester, who carries out the test. The tester has to find defects without any proper planning
and documentation, solely based on tester's intuition.
2. Pair Testing: Two testers are assigned the same modules and they share ideas and work on the
same systems to find defects. One tester executes the tests while another tester records the notes on
their findings.
3. Monkey Testing: Testing is performed randomly without any test cases in order to break the
system.
Various ways to make Adhoc Testing More Effective
1. Preparation: By getting the defect details of a similar application, the probability of finding defects
in the application is more.
2. Creating a Rough Idea: By creating a rough idea in place the tester will have a focussed approach.
It is NOT required to document a detailed plan as what to test and how to test.
3. Divide and Rule: By testing the application part by part, we will have a better focus and better
understanding of the problems if any.
4. Targeting Critical Functionalities: A tester should target those areas that are NOT covered while
designing test cases.
5. Using Tools: Defects can also be brought to the lime light by using profilers, debuggers and even
task monitors. Hence being proficient in using these tools one can uncover several defects.
6. Documenting the findings: Though testing is performed randomly, it is better to document the tests
if time permits and note down the deviations if any. If defects are found, corresponding test cases
are created so that it helps the testers to retest the scenario.
Internationalization testing
Internationalization testing is the process of verifying the application under test to work uniformly
across multiple regions and cultures.
The main purpose of internationalization is to check if the code can handle all international support
without breaking functionality that might cause data loss or data integrity issues. Globalization
testing verifies if there is proper functionality of the product with any of the locale settings.
Internationalization Checklists:
3. Verify if the product works across language settings and currency settings.
SOA
SOA is a method of integrating business applications and processes together so as to meet the
business needs.
In Software Engineering, SOA provides agility and flexibility to business processes. The changes
to the process or application can be directed to a particular component without affecting the whole
system.
The software developers in SOA either develop or buy chunks of programs called SERVICES.
Services can be a functional unit of application or business process, which can be reused or
repeated by any other application or process.
(For example, in the above image, Payment Gateway is a service which can be reused by any e-
commerce site. Whenever a payment needs to do, the e-commerce site calls/Requests the Payment
Gateway service. After payment is done on a gateway, a response is sent to the e-commerce
website)
SOA consists of various technologies. Applications built using SOA has various services which are
loosely coupled.
Services Layer
This layer consists of the services, services exposed by a system derived from business functions.
For example –
Weight Tracker
Process Layer
Process Layer consists the processes, collection of services which are part of a single functionality.
The processes might be a part of user interface (for ex – A search engine), a part of an ETL tool
(for getting data from the database).
The main focus in this layer will be in user interfaces and process.
The user interface of the weight tracker and its integration with the Database is the primary focus.
Below functions will be of consideration
Adding new data
Editing existing data
Creating new tracker
Deleting data
Consumer Layer
Service level
Interface level
End to End level
Execution.
The most fundamental test scenarios in the functional testing can be considered as :
To validate whether all the required mandatory fields are working as required.
To validate that the mandatory fields are displayed in the screen in a distinctive way than the
non- mandatory fields.
To validate whether the application works as per as requirement whenever the
application starts/stops.
To validate whether the application goes into minimized mode whenever there is an
incoming phone call. In order to validate the same we need to use a second phone, to call the
device.
To validate whether the phone is able to store, process and receive SMS whenever the app is
running. In order to validate the same we need to use a second phone to send sms to the
device which is being tested and where the application under test is currently running.
To validate that the device is able to perform required multitasking requirements whenever it
is necessary to do so.
To validate that the application allows necessary social network options such as sharing,
posting and navigation etc.
To validate that the application supports any payment gateway transaction such as
Visa, Mastercard, Paypal etc as required by the application.
To validate that the page scrolling scenarios are being enabled in the application as necessary.
To validate that the navigation between relevant modules in the application are as per
the requirement.
To validate that the truncation errors are absolutely to an affordable limit.
To validate that the user receives an appropriate error message like “Network error. Please try
after some time” whenever there is any network error.
To validate that the installed application enables other applications to perform satisfactorily, and
it does not eat into the memory of the other applications.
To validate that the application resumes at the last operation in case of a hard reboot or system
crash.
To validate whether the installation of the application can be done smoothly provided the user
has the necessary resources and it does not lead to any significant errors.
To validate that the application performs auto start facility according to the requirements.
To validate whether the application performs according to the requirement in all versions of
Mobile that is 2g, 3g and 4g.
To perform Regression Testing to uncover new software bugs in existing areas of a system
after changes have been made to them. Also rerun previously performed tests to determine that
the program behavior has not changed due to the changes.
To validate whether the application provides an available user guide for those who are not
familiar to the app
UNIT V
A Test case is a group of steps that is to be executed to check the functionality of a specific
object or an operational logic. Test case describes the user input and the system response
with some preconditions to determine the correctness and completeness of the
functionality.
Test case is usually associated with at least one business function/requirement that is
being validated. It requires a specific test data to be developed for input during , test
case execution. The test case execution may be governed by preconditions than are
required or setup before the execution of the test case, such as database support, printer
setup, or data that should exist at the start of the test case execution. A test case is a self-
standing and self-cleaning test with a specific purpose that points back to the
specifications, and if failed, it points to the bug.
Finally, we conclude that a test case validates one or more criteria to certify that an
application is structurally and functionally ready to be implemented into the business
production environment
Test case design determines the strategies of operating, observing, and evaluating the
software build. Sometimes, a proper test design can even detect mix-ups in already
furnished designs of the application, functional specifications, or the use cases. Hence,
designing test cases is essential to perform a good test. A good test is the one that has
high probability of finding an error.
The test cases will be effective and reusable, it they are designed by following certain rules.
Therefore, a test case must
Be divided into different test cases to keep them short and avoid confusions
within the testers
Be divided into positive and negative scenarios
Be uniquely identified for revisiting
Hold the bug id for tacking purpose
Start with the word 'Verify' or 'Check'
Contain a maximum of 10 to 15 steps
Be reviewed by the superiors to ensure the coverage of whole functionality
Be approved by the client
Usually the project management supplies this functional specification document. This type
of testing activity checks whether the product is working as per the functional specifications
or not. We should be able to decide the different types of tests that are to be per formed on
the product, such as functional testing, performance testing, and other system tests.
In this method, the client interaction would be critical to clarify the issues on the
functionality, relations, and others. It is rare to have a complete set o f functional
specifications. Hence, to author test cases using functional specifications, one should follow
a procedure:
Analyze the requirements in terms of entry point, exit point, normal flow, alternative
flows, input required, expected outputs, and exceptions
Analyze the dependency in between requirements.
Understand the behavior by exploring the corresponding application/product
Determine the order or sequence of requirements in which specific transact must be
tested
Determine the preconditions or setup necessary to execute a test procedure, as put
the application build in ready state, database configuration, or requirements
Determine the high-risk requirements
Author the test case titles or test scenarios
Review the test case titles or test scenarios
Finally, write the test cases documents
A login process allows user id and password to authorize users. To authorize, users
must give alphanumeric in lowercase from 4 to 16 characters long for user id and
alphabets in lowers case from 4 to 8 characters long for password
Test cases: Verify user-id entry
BVA ECP
BVA ECP
A use case is a sequence of transactions that gives a measurable result of value for an actor.
Actor is a person, thing, or any external application that uses the application under
development or on which the current application may depend. The collection of use cases is the
system's complete functionality. A use case defines a goal-oriented set of Interactions between
external users and the system under consideration or development.
A use case scenario is a description that illustrates, a systematic process of how a user intends
to use a system, essentially capturing the system behavior from the user's point of view.
Usually, during Requirements gathering phase, use cases are captured from the client
As far as possible, write test cases in such a way that you test only one thing at a
time. Do not overlap or complicate test cases. Attempt to make your test cases
‘atomic’.
Ensure that all positive scenarios AND negative scenarios are covered.
Language:
Write in simple and easy-to-understand language.
Use active voice instead of passive voice: Do this, do that.
Use exact and consistent names (of forms, fields, etc).
Characteristics of a good test case:
Accurate: Exacts the purpose.
Economical: No unnecessary steps or words.
Traceable: Capable of being traced to requirements.
Repeatable: Can be used to perform the test over and over.
Reusable: Can be reused if necessary.
ISTQB Definition
test case: A set of preconditions, inputs, actions (where applicable), expected results and
postconditions, developed based on test conditions.
high-level test case: A test case with abstract preconditions, input data, expected results,
postconditions, and actions (where applicable).
low-level test case: A test case with concrete values for preconditions, input data, expected
results and postconditions and detailed description of actions (where applicable).
TEST CASE TEMPLATE
A test case can have the following elements. Note, however, that a test management tool is
normally used by companies and the format is determined by the tool used.
Test Suite ID The ID of the test suite to which this test case belongs.
Related Requirement The ID of the requirement this test case relates/traces to.
The test data, or links to the test data, that are to be used while conducting the
Test Data
test.
Actual Result The actual result of the test; to be filled after executing the test.
Pass or Fail. Other statuses can be ‘Not Executed’ if testing is not performed
Status
and ‘Blocked’ if testing is blocked.
Remarks Any comments on the test case or test execution.
Test Environment The environment (Hardware/Software/Network) in which the test was executed
When the test engineer writes a test case, he/she may skip some scenarios, inputs and writes wrong
navigation steps, which may affect the entire test execution process.
To avoid this, we will do one round of review and approval process before starting test
execution.
If we don't go for the review process, we miss out some scenarios, accuracy won't be there, and
the test engineer won't be serious
Traceability Matrix
Traceability matrix is a table type document that is used in the development of software
application to trace requirements. It can be used for both forward (from Requirements to Design or
Coding) and backward (from Coding to Requirements) tracing. It is also known as Requirement
Traceability Matrix (RTM) or Cross Reference Matrix (CRM).
It is prepared before the test execution process to make sure that every requirement is covered in
the form of a Test case so that we don't miss out any testing. In the RTM document, we map all
the
requirements and corresponding test cases to ensure that we have written all the test cases for each
condition.
The test engineer will prepare RTM for their respective assign modules, and then it will be sent to
the Test Lead. The Test Lead will go repository to check whether the Test Case is there or not and
finally Test Lead consolidate and prepare one necessary RTM document.
This document is designed to make sure that each requirement has a test case, and the test case is
written based on business needs, which are given by the client. It will be performed with the help
of the test cases if any requirement is missing, which means that the test case is not written for a
particular need, and that specific requirement is not tested because it may have some bugs. The
traceability is written to make sure that the entire requirement is covered.
We can observe in the below image that the requirement number 2 and 4 test case names are not
mentioned that's why we highlighted them, so that we can easily understand that we have to write
the test case for them.
Generally, this is like a worksheet document, which contains a table, but there are also many user-
defined templates for the traceability matrix. Each requirement in the traceability matrix is
connected with its respective test case so that tests can be carried out sequentially according to
specific requirements.
Note:
We go for RTM after approval and before execution so that we don't miss out on any Test Case for
any requirement.
We don't write RTM while writing the testing because it can be incomplete, and after writing the
test case, we don't go here because the test case can be rejected.
RTM document ensures that at least there is one test case written in each requirement, whereas it
does not talk about all possible test cases written for the particular requirement.
RTM Template
o It helps in tracing the documents that are developed during various phases of SDLC.
o It ensures that the software completely meets the customer's requirements.
o It helps in detecting the root cause of any bug.
The traceability matrix can be classified into three different types which are as follows:
o Forward traceability
o Backward or reverse traceability
o Bi-directional
The forward traceability test matrix is used to ensure that every business's needs or requirements
are executed correctly in the application and also tested rigorously. The main objective of this is to
verify whether the product developments are going in the right direction. In this, the requirements
are mapped into the forward direction to the test cases.
The reverse or backward traceability is used to check that we are not increasing the space of the
product by enhancing the design elements, code, test other things which are not mentioned in the
business needs. And the main objective of this that the existing project remains in the correct
direction. In this, the requirements are mapped into the backward direction to the test cases.
Bi-directional traceability
It is a combination of forwarding and backward traceability matrix, which is used to make sure
that all the business needs are executed in the test cases. It also evaluates the modification in the
requirement which is occurring due to the bugs in the application.
Advantage of RTM
o With the help of the RTM document, we can display the complete test execution and bugs
status based on requirements.
The Bug is the informal name of defects, which means that software or application is not working
as per the requirement.
In software testing, a software bug can also be issue, error, fault, or failure. The bug occurred when
developers made any mistake or error while developing the product.
While testing the application or executing the test cases, the test engineer may not get the expected
result as per the requirement. And the bug had various names in different companies such as error,
issues, problem, fault, and mistake, etc.
o Defect
o Bug
o Error
o Issue
o Mistakev
o Failurev
Terms Description Raised by
In software testing, the bug can occur for the following reasons:
Wrong coding
Missing coding
Extra coding
Wrong coding
Missing coding
Here, missing coding means that the developer may not have developed the code only for that
particular feature.
For example: if we take the above example and open the inbox link, we see that it is not there
only, which means the feature is not developed only.
Extra coding
Here, extra coding means that the developers develop the extra features, which are not required
according to the client's requirements.
For example:
Suppose we have one application form wherein the Name field, the First name, and Last
name textbox are needed to develop according to the client's requirement.
But, the developers also develop the "Middle name" textbox, which is not needed according to
the client's requirements as we can see in the below image:
If we develop an extra feature that is not needed in the requirement, it leads to unnecessary extra
effort. And it might also happen that adding up the extra feature affects the other elements too.
We have various types of bug tracking tools available in software testing that helps us to track the
bug, which is related to the software or the application.
Some of the most commonly used bug tracking tools are as follows:
Jira
Bugzilla
Redmine
Mantis
Backlog
Jira
Jira is one of the most important bug tracking tools. Jira is an open-source tool that is used for bug
tracking, project management, and issue tracking in manual testing.
Jira includes different features like reporting, recording, and workflow. In Jira, we can track all
kinds of bugs and issues, which are related to the software and generated by the test engineer.
To get the complete details about Jira tool, refer to the below
link: https://www.javatpoint.com/jira-tutorial
Bugzilla
Bugzilla is another important bug tracking tool, which is most widely used by many organizations
to track the bugs.
Bugzilla is an open-source tool, which is used to help the customer, and the client to maintain the
track of the bugs.
It is also used as a test management tool because, in this, we can easily link other test case
management tools such as ALM, quality Centre, etc.
Bugzilla supports various operating systems such as Windows, Linux, and Mac.
Bugzilla has some features which help us to report the bug easily:
Redmine
It is an open-source tool which is used to track the issues and web-based project management tool.
Redmine tool is written in Ruby programing language and also compatible with multiple
databases like MySQL, Microsoft SQL, and SQLite.
While using the Redmine tool, users can also manage the various project and related subprojects.
MantisBT
MantisBT stands for Mantis Bug Tracker. It is a web-based bug tracking system, and it is also an
open-source tool.
MantisBT is used to follow the software defects. It is executed in the PHP programing language.
Some of the common features of MantisBT are as follows:
Full-text search
Audit trails of changes made to issues
Revision control system integration
Revision control of text fields and notes
Notifications
Plug-ins
Graphing of relationships between issues
Backlog
The backlog is widely used to manage the IT projects and track the bugs. It is mainly built for the
development team for reporting the bugs with the complete details of the issues, comments.
Updates and change of status. It is a project management software.
Test execution is the process of executing the code and comparing the expected and actual results.
Following factors are to be considered for a test execution process:
Based on a risk, select a subset of test suite to be executed for this cycle.
Assign the test cases in each test suite to testers for execution.
Execute tests, report bugs, and capture test status continuously.
Resolve blocking issues as they arise.
Report status, adjust assignments, and reconsider plans and priorities daily.
Report test cycle findings and status.
Risk is the occurrence of an uncertain event with a positive or negative effect on the
measurable success criteria of a project. It could be events that have occurred in the past
or current events or something that could happen in the future. These uncertain events can
have an impact on the cost, business, technical and quality targets of a project.
Positive risks are referred to as opportunities and help in business sustainability. For
example investing in a New project, Changing business processes, Developing new
products.
New projects with high risk factors like Lack of experience with the technologies used,
Lack of business domain knowledge.