0% found this document useful (0 votes)
42 views66 pages

Software Testing: Course Code: SWE2005

The document outlines a software testing course (SWE2005) at VIT University, detailing its objectives, expected outcomes, and the evolution of software testing practices. It emphasizes the importance of software testing throughout the software development life cycle (SDLC) and addresses common myths about testing. The document also discusses the goals of software testing, the psychological aspects involved, and the necessity of a structured approach to testing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views66 pages

Software Testing: Course Code: SWE2005

The document outlines a software testing course (SWE2005) at VIT University, detailing its objectives, expected outcomes, and the evolution of software testing practices. It emphasizes the importance of software testing throughout the software development life cycle (SDLC) and addresses common myths about testing. The document also discusses the goals of software testing, the psychological aspects involved, and the necessity of a structured approach to testing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 66

Software Testing

Course Code: SWE2005

Handled By
R . Swetha
Assistant Professor(Contract), SCORE
VIT University
Course Objectives

1. To learn fundamental concepts in software testing


2. To identify various software testing issues and solutions in software
unit test; integration, regression, and system testing.
3. Test project, design test cases and data.
4. To plan and execute a testing project for use modern software testing
tools to support software testing projects
Expected Course Outcome

1. Apply software testing knowledge and engineering methods.


2. Examine and solve various functionality problems by designing and selecting testing
models and
methods.
3. Examine and solve various program logic or structure problems, by designing and selecting
testing models and methods.
4. Develop construct the complementary techniques to dynamic testing for improving the
software
quality.
5. Design and experiment a software test process for a software project.
6. Interpret and review the contemporary issues in software testing, such as component
based
software testing problems.
7. Apply debugging process and techniques for software engineering problems.
8. Use and demonstrate software testing methods and modern software testing tools for their
testing projects.
Introduction to Software Development
• This is an exciting time to be a software developer.
• They are playing an increasingly important role in society.
• People with software development skills are in demand.
• New methods, techniques, and tools are becoming
available to support development and maintenance tasks.
• Because software now has such an important role in our
lives both economically and socially, there is pressure for
software professionals to focus on quality issues.
• Poor quality software that can cause loss of life or
property is no longer acceptable to society
What is Software?
Software is a set of instructions stored digitally
within the computers memory which tells the
computer system what to do.

What is Testing ?
Testing is the process of executing a
program with the intension of finding
errors.
SDLC-Waterfall Model
SDLC
• SDLC is a process followed for software building within a
software organization.
• SDLC consists of a precise plan that describes how to develop,
maintain, replace, and enhance specific software.
• The life cycle defines a method for improving the quality of
software and the all-around development process.
• SDLC specifies the task(s) to be performed at various stages by
a software engineer or developer.
• It ensures that the end product is able to meet the customer’s
expectations and fits within the overall budget.
Introduction to Software Testing

• Software testing has always been considered a single phase


performed after coding.
• But time has proved that our failures in software projects are
mainly due to the fact that we have not realized the role of
software testing as a process.
• Thus, its role is not limited to only a single phase in the
software development life cycle (SDLC), but it starts as soon as
the requirements in a project have been gathered.
Introduction to Software Testing

• “There is no life without struggles and no software without bugs”. By


Naresh Chauhan
• Just as one needs to sort out the problems in one’s life, it is equally
important to check and weed out the bugs in software.
• Software is becoming complex, but the demand for quality in
software products has increased.
• This rise in customer awareness for quality increases the workload
and responsibility of the software development team.
• That is why software testing has gained so much popularity in the last
decade.
• Job trends have shifted from development to software testing.
• Today, software quality assurance and software testing courses are
offered by many institutions
SOFTWARE TESTING DEFINITIONS

• Testing is the process of executing a program with the intent


of finding errors. By Myers
• Testing is a support function that helps developers look good
by finding their mistakes before anyone else does. James Bach
• Software testing is a process that detects important bugs with
the objective of having better quality software. By Naresh
Chauhan
• Software Testing is a method to check whether the actual
software product matches expected requirements and to
ensure that software product is Defect free.
Initiating A Study Of Testing

• A common vocabulary that is widely accepted in academia


and industry.
• Errors- An error refers to a mistake made by a programmer,
like syntax errors or logical errors.
• Faults (Defects)- a defect in a software system that can lead to
errors or failures during its operation.
• Failures : Test failure happens when a test case results does
not meet the expected outcome or assertion.
• Bugs: Bug is an error detected in the development
environment during testing stage.
• Test Bed : a test environment set up with test data.
Evolution of Software testing

• In the early days of software development, software testing was considered


only a debugging process for removing errors after the development of
software.
• In 1978, G. J. Myers realized the need to discuss the techniques of software
testing in a separate subject.
• He emphasized that there is a requirement that undergraduate students
must learn software testing techniques so that they pass out with the basic
knowledge of software testing and do not face problems in the industry.
• By 1980, software professionals and organizations started emphasizing on
quality.
• In the 1990s, testing tools finally came into their own.
• There was a flood of various tools, which are absolutely vital to adequate
testing of software systems.
• However, they do not solve all problems and cannot replace a testing process
Evolution of Software testing
Evolution of Software testing

Debugging-oriented Phase (Before 1957)


• This phase is the early period of testing. At that time,
testing basics were unknown.
• Programs were written and then tested by the
programmers until they were sure that all the bugs were
removed.
• The term used for testing was checkout, focused on
getting the system to run
• Till 1956, there was no clear distinction between
software development, testing, and debugging
Destruction-oriented Phase (1979–82)
• This phase can be described as the revolutionary turning
point in the history of software testing.
• Myers changed the view of testing from ‘testing is to
show the absence of errors’ to ‘testing is to find more
and more errors.’
• He separated debugging from testing and stressed on the
valuable test cases if they explore more bugs
Evaluation-oriented Phase (1983–87)
• Bugs were identified at an early stage of development, it
was cheaper to debug them as compared to the bugs
found in implementation or post-implementation phases.
• This phase stresses on the quality of software products
such that it can be evaluated at every stage of
development.
• In 1983, guidelines by the National Bureau of Standards
were released to choose a set of verification and validation
techniques and evaluate the software at each step of
software development.
Prevention-oriented Phase (1988–95)
• With the idea of early detection of bugs in earlier phases,
we can prevent the bugs in implementation or further
phases.
• Beyond this, bugs can also be prevented in other projects
with the experience gained in similar software projects.
• The prevention model includes test planning, test
analysis, and test design activities playing a major role.
Process-oriented Phase (1996 onwards)
• In this phase, testing was established as a complete
process rather than a single phase (performed after
coding) in the software development life cycle
(SDLC).
• The model for measuring the testing process is
known as Testing Maturity Model (TMM).
• The emphasis in this phase is also on quantification
of various parameters which decide the
performance of a testing process.
Evolution of Software testing

The evolution of software testing was also discussed in three phases, namely
Software Testing 1.0, Software Testing 2.0, and Software Testing 3.0

• Software Testing 1.0


• No test organization was there. A few testing tools were present but their
use was limited due to high cost.
• Software Testing 2.0
• In this phase, software testing gained importance in SDLC and the concept
of early testing also started. Many testing tools were also available in this
phase.
• Software Testing 3.0
• In this phase, software testing is being evolved in the form of a process
which gives us a roadmap of the overall testing process.
• The management is actively involved in this phase.
SOFTWARE TESTING— MYTHS AND FACTS
Myth : Testing is a single phase in SDLC .

Truth: It is a myth, at least in the academia, that software testing


is just a phase in SDLC and we perform testing only when the
running code of the module is ready.
But in reality, testing starts as soon as we get the requirement
specifications for the software.
And the testing work continues throughout the SDLC, even post-
implementation of the software
SOFTWARE TESTING— MYTHS AND FACTS

Myth : Testing is easy.

Truth: The general perception is that, software testing is an


easy job, wherein test cases are executed with testing tools
only.
Testers’ job is not easy, as they have to plan and develop the
test cases manually and it requires a thorough understanding
of the project being developed with its overall design.
Overall, testers have to shoulder a lot of responsibility which
sometimes make their job even harder than that of a
developer.
SOFTWARE TESTING— MYTHS AND FACTS

Myth : Software development is worth more than testing.

Truth: As a fresher, we dream of a job as a developer. We get


into the organization as a developer and feel superior to other
team members.
we have this myth right from the beginning of our career, and
testing is considered a secondary job.
But testing has now an established path for job-seekers.
Testing is a complete process like development, so the testing
team enjoys equal status and importance as the development
team
SOFTWARE TESTING— MYTHS AND FACTS
Myth : Complete testing is possible.

Truth: This myth also exists at various levels of the development team.
Almost every person who has not experienced the process of designing
and executing the test cases manually feels that complete testing is
possible.
Complete testing at the surface level assumes that if we are giving all the
inputs to the software, then it must be tested for all of them.
But in reality, it is not possible to provide all the possible inputs to test
the software, as the input domain of even a small program is too large to
test.
Moreover, there are many things which cannot be tested completely, as
it may take years to do so.
SOFTWARE TESTING— MYTHS AND FACTS

Myth : Testing starts after program development.

Truth: Most of the team members, who are not aware of


testing as a process, still feel that testing cannot commence
before coding.
But this is not true. The work of a tester begins as soon as we
get the specifications.
The tester performs testing at the end of every phase of
SDLC .
Tester writes detailed test cases, executes the test cases,
reports the test results, etc
SOFTWARE TESTING— MYTHS AND FACTS

Myth : The purpose of testing is to check the functionality of the


software.

Truth: Today, all the testing activities are driven by quality goals.
Ultimately, the goal of testing is also to ensure quality of the
software.
But quality does not imply checking only the functionalities of all
the modules.
There are various things related to quality of the software, for
which test cases must be executed.
SOFTWARE TESTING— MYTHS AND FACTS

Myth : Anyone can be a tester.

Truth: Most of us think that testing can be performed easily


without any training. And therefore, anyone can be a tester.
software testing as a career also needs training for various
purposes, such as to understand
(i) various phases of software testing life cycle,
(ii) recent techniques to design test cases,
(iii) various tools and how to work on them, etc
Goals of Software Testing
The main goal of software testing is to find bugs as early as possible and fix bugs and
make sure that the software is bug-free.

• Important Goals of Software Testing:


• Detecting bugs as soon as feasible in any situation.
• Avoiding errors in a project’s and product’s final versions.
• Inspect to see whether the customer requirements criterion has been satisfied.
• Last but not least, the primary purpose of testing is to gauge the project and
product level of quality.
The goals of software testing may be classified into three major categories as follows:

• Immediate Goals
• Long-term Goals
• Post-Implementation Goals
GOALS OF SOFTWARE TESTING
GOALS OF SOFTWARE TEST

Short-term or immediate goals


These goals are the immediate results after performing
testing. These goals may be set in the individual phases of
SDLC. Some of them are discussed below.

Bug discovery: More the bugs discovered at an early stage,


better will be the success rate of software testing.

Bug prevention:Everyone in the software development team


gets to learn how to code safely such that the bugs discovered
should not be repeated in later stages or future projects.
GOALS OF SOFTWARE TEST

Long-term goals:These goals affect the product quality in the


long run, when one cycle of the SDLC is over.

Quality: Thorough testing ensures superior quality.


Reliability is a matter of confidence that the software will not
fail, and this level of confidence increases with rigorous testing.
GOALS OF SOFTWARE TEST

Customer satisfaction:

Testing should be complete in the sense that it must satisfy the


user for all the specified requirements mentioned in the user
manual, as well as for the unspecified requirements which are
otherwise understood.
GOALS OF SOFTWARE TEST

Risk management:
For example, testing may indicate that the software being developed
cannot be delivered on time, or there is a probability that high priority
bugs will not be resolved by the specified time
GOALS OF SOFTWARE TEST

Post-implementation goals : These goals are important after the


product is released. Some of them are discussed here:

Reduced maintenance cost: The maintenance cost of any software


product is not its physical cost, as the software does not wear out.
Post-release errors are costlier to fix, as they are difficult to detect.

Improved software testing process


The bug history and post-implementation results can be analyzed
to find out snags in the present testing process, which can be
rectified in future projects.
PSYCHOLOGY FOR SOFTWARE TESTING

Software testing is directly related to human psychology.


“Testing is the process of demonstrating that there are no
errors.”

It is very common that they feel embarrassed or guilty


when someone finds errors in their software. However,
we should not forget that humans are prone to error.

“Testing is the process of executing a program with the


intent of finding errors”.
MODEL FOR SOFTWARE TESTING

• These models are blueprints for identifying and eliminating defects,


guaranteeing that the software delivers value to users and aligns
with predefined standards.
• some cool stuff about software testing models?
-> The first software testing model was developed in the 1950s.
-> Software testing is now a multi-billion dollar industry.
->There are hundreds of different software testing tools and
techniques available.
-> Software testing is essential to software development and can
help prevent costly mistakes.
MODEL FOR SOFTWARE TESTING
• Testing is not an intuitive activity, rather it should be learnt as
a process. Therefore, testing should be performed in a
planned way.
MODEL FOR SOFTWARE TESTING

 The software is basically a part of a system for which it is being developed.


Systems consist of hardware and software to make the product run.
 Testability is a major issue for the developer while developing the software, as a
badly written software may be difficult to test.
 Testers are supposed to get on with their tasks as soon as the requirements are
specified.
 Testers work on the basis of a bug model which classifies the bugs based on the
criticality or the SDLC phase.
 Based on the software type and the bug model, testers decide a testing
methodology which guides how the testing will be performed.
 With suitable testing techniques decided in the testing methodology, testing is
performed on the software with a particular goal.
 If the testing results are inline with the desired goals, then the testing is
successful; otherwise, the software or the bug model or the testing
methodology has to be modified so that the desired results are achieved.
MODEL FOR SOFTWARE TESTING

Software and Software Model:

 It is a complex entity which deals with environment,


logic, programmer psychology, etc.
 But a complex software makes it very difficult to test.
 They should design and code the software such that
it is testable at every point.
 Thus, the software to be tested may be modeled
such that it is testable, avoiding unnecessary
complexities.
MODEL FOR SOFTWARE TESTING

Bug Model:
 Bug model provides a perception of the kind of bugs
expected.
 Considering the nature of all types of bugs, a bug model can
be prepared that may help in deciding a testing strategy.
 However, every type of bug cannot be predicted. Therefore, if
we get incorrect results, the bug model needs to be modified.
MODEL FOR SOFTWARE TESTING
Testing methodology and Testing:

 Based on the inputs from the software model and the bug model,
testers can develop a testing methodology that incorporates both
testing strategy and testing tactics.
 Testing strategy is the roadmap that gives us well-defined steps for the
overall testing process
 It prepares the planned steps based on the risk factors and the testing
phase.
 Once the planned steps of the testing process are prepared, software
testing techniques and testing tools can be applied within these steps.
 However, if we don’t get the required results, the testing plans must be
checked and modified accordingly.
SCHOOLS OF SOFTWARE TESTING
Software testing has also been classified into some views according to some
practitioners. They call these views or ideas as schools of testing.

 Analytical School of Testing


 Standard School of Testing
 Quality School of Testing
 Context-driven School of Testing
 Agile School of Testing
SCHOOLS OF SOFTWARE TESTING
1. Analytical School of Testing

 In this school of testing, software is considered as a logical artifact.


 Therefore, software testing techniques must have a logico-
mathematical form.
 This school requires that there must be precise and detailed
specifications for testing the software.
 Moreover, it provides an objective measure of testing.
 After this, testers are able to verify whether the software conforms
to its specifications.
 Structural testing is one example for this school of testing. Thus,
the emphasis is on testing techniques which should be adopted.
SCHOOLS OF SOFTWARE TESTING
Standard School of Testing
 “This school defines software testing as a managed
process”
 The core beliefs of this school of testing are:
1. Testing must be managed. It means the testing process
should be predictable, repeatable, and planned.
2. Testing must be cost-effective.
3. Low-skilled workers require direction.
4. Testing validates the product.
5. Testing measures development progress
SCHOOLS OF SOFTWARE TESTING
Standard School of Testing
 The implications of this school are:
1. There must be clear boundaries between testing and other
activities.
2. Plans should not be changed as it complicates progress
tracking.
3. There must be some test standards, best practices, and
certification.
4. Software testing is a complete process.
SCHOOLS OF SOFTWARE TESTING
Quality School of Testing

The core beliefs of this school of testing are:


1. Software quality requires discipline.
2. Testing determines whether development processes are being followed.
3. Testers may need to police developers to follow the rules.
4. Testers have to protect the users from bad software. Thus, the emphasis
is to follow a good process. This school defines software testing as a
branch of software quality assurance.
The implications of this school are:
5. It prefers the term ‘quality assurance’ over ‘testing.’
6. Testing is a stepping stone to ‘process improvement.
SCHOOLS OF SOFTWARE TESTING
Context-driven School of Testing

This school is based on the concept that testing should be performed according to
the context of the environment and project.
Testing solutions cannot be the same for every context. For example, if there is a
high-cost real-time defense project, then its testing plans must be different as
compared to any daily-life low-cost project.
Thus, context-driven testing can be defined as the testing driven by environment,
type of project, and the intended use of software.
The implications of this school are:
1. Expect changes. Adapt testing plans based on test results.
2. Effectiveness of test strategies can only be determined with field research.
3. Testing research requires empirical and psychological study.
4. Focus on skill over practice
SCHOOLS OF SOFTWARE TESTING
. Agile School of Testing
 This type of school is based on testing the software which is being
developed by iterative method of development and delivery.
 In this type of process model, the software is delivered in a short
span of time; and based on the feedback, more features and
capabilities are added.
 The focus is on satisfying the customer by delivering a working
software quickly with minimum features and then improvising on it
based on the feedback.
 The customer is closely related to the design and development of
the software.
 Since the delivery timelines are short and new versions are built
by modifying the previous one, chances of introducing bugs are
high during the changes done to one version.
SOFTWARE TESTING LIFE CYCLE (STLC)
• The testing process divided into a well-defined sequence of
steps is termed as software testing life cycle (STLC).
• The major contribution of STLC is to involve the testers at
early stages of development.
SOFTWARE TESTING LIFE CYCLE (STLC)
• Test Planning :
• The goal of test planning is to take into account the important issues of
testing strategy, viz. resources, schedules, responsibilities, risks, and
priorities, as a
Broadly, following are the activities during test planning:
• Defining the test strategy.
• Estimate the number of test cases, their duration, and cost.
• Plan the resources like the manpower to test, tools required, documents
required.
• Identifying areas of risks.
• Defining the test completion criteria.
• Identification of methodologies, techniques, and tools for various testcases.
• Identifying reporting procedures, bug classification, databases for testing,
bug severity levels, and project metrics.
SOFTWARE TESTING LIFE CYCLE (STLC)
• Test Design :
• The test design is an important phase after test planning..
It includes the following critical activities :
• (i) Determining the test objectives and their prioritization.
• (ii) Preparing list of items to be tested.
• (iii) Mapping items to test cases. After making a list of items to be
tested, there is a need to identify the test cases. A matrix can be
created for this purpose, identifying which test case will be covered by
which item.
This matrix will help in:
(a) Identifying the major test scenarios.
(b) Identifying and reducing the redundant test cases.
(c) Identifying the absence of a test case
SOFTWARE TESTING LIFE CYCLE (STLC)
• Test Design :

• (iv) Selection of test case design techniques : While designing test cases, there
are two broad categories, namely black-box testing and white-box testing.
Black box test case design techniques generate test cases without knowing the
internal working of a system.
• (v) Creating test cases and test data : The test cases mention the objective
under which a test case is being designed, the inputs required, and the
expected outputs.
• (vii) Setting up the test environment and supporting tools: details like
hardware configurations, testers, interfaces, operating systems, and manuals
must be specified during this phase.
• (viii)Creating test procedure specification :This is a description of how the test
case will be run. It is in the form of sequenced steps. This procedure is actually
used by the tester at the time of execution of test cases.
SOFTWARE TESTING LIFE CYCLE (STLC)
• Test Execution :

• In this phase, all test cases are executed including verification and validation.
• Verification test cases are started at the end of each phase of SDLC.
• Validation test cases are started after the completion of a module.
• It is the decision of the test team to opt for automation or manual execution.
• Test results are documented in the test incident reports, test logs, testing stat us, and test
summary reports
SOFTWARE TESTING LIFE CYCLE (STLC)
• Responsibilities at various levels for execution of the test
cases are outlined :
SOFTWARE TESTING LIFE CYCLE (STLC)

• Post-Execution/Test Review : After successful test execution, bugs will be reported to


the concerned developers. As soon as the developer gets the bug report, he performs
the following activities:

• (a) Understanding the bug


• (b) Reproducing the bug
• (c) Analysing the nature and cause of the bug- the developer starts debugging its
symptoms and tracks back to the actual location of the error in the design
• The final bug report and associated metrics are reviewed and analysed for overall
testing process.

• (a) Reliability analysis- whether the software meets the predefined reliability goals or
not
• (b) Coverage analysis- can be used as an alternative criterion to stop testing
• (c) Overall defect analysis can identify risk areas and help focus our efforts on quality
improvement.
SOFTWARE TESTING METHODOLOGY
SOFTWARE TESTING METHODOLOGY
• SOFTWARE TESTING STRATEGY
• Testing strategy is the planning of the whole testing process into a well-
planned series of steps.
• Strategy provides a roadmap that includes very specific activities that
must be performed by the test team in order to achieve a specific goal.

• Test Factors : Test factors are risk factors or issues related to the system
under development.
• Risk factors need to be selected and ranked according to a specific
system under development.

• Test Phase: It refers to the phases of SDLC where testing will be


performed.
SOFTWARE TESTING METHODOLOGY
• TEST STRATEGY MATRIX
• This matrix becomes an input to develop the testing strategy.
• The matrix is prepared using test factors and test phase.
SOFTWARE TESTING METHODOLOGY
• Creating a test strategy:
• Let’s take a project as an example. Suppose a new operating system has to
be designed, which needs a test strategy. The following steps are used
SOFTWARE TESTING METHODOLOGY
• DEVELOPMENT OF TEST STRATEGY:
• The testing strategy should start at the component level and
finish at the integration of the entire system.
• The testing process is a combination of verification and
validation.
• Verification can be applied to all stages of SDLC.
• Validation is a very general term to test the software as a
whole in conformance with customer expectations.

• Verification is ‘Are we building the product right?’


• Validation is ‘Are we building the right product?’
SOFTWARE TESTING METHODOLOGY
• TESTING LIFE CYCLE MODEL(V-Testing Life Cycle Model):
• When the project starts, both the system development and the system
test process begin.
• Both teams start at the same point using the same information.
SOFTWARE TESTING METHODOLOGY
• TESTING TACTICS

• Software Testing Techniques


• (i) Static Testing : It is a technique for assessing the structural characteristics
of source code. we never execute the code in this technique.
• (ii) Dynamic Testing : In this technique, the code is run on a number of inputs
provided by the user and the corresponding results are checked.
• This type of testing is further divided into two parts: (a) black-box testing
and (b) white-box testing.

• Testing Tools : A tool is a resource for performing a test process.


• The combination of tools and testing techniques enables the test process to
be performed.
Summary

You might also like