This document provides an introduction to software testing. It defines software testing as checking whether a software product matches expected requirements and is defect-free. It discusses software testing background topics like infamous software error case studies, what a bug is, why bugs occur, the cost of bugs, what software testers do, and what makes a good software tester. It also covers software bugs, the cost of bugs, testing axioms, precision and accuracy, verification and validation, quality and reliability testing, testing and quality assurance, functional and structural testing methodologies, static and dynamic testing, and formal reviews.
1. SOFTWARE TESTING
Prepared By
Dr P PRABAKARAN
Assistant Professor
Department of Computer Applications â PG
School of Computing Sciences
Vels Institute of Science Technologies and Advanced Studies
Chennai
2. Software Testing - Introduction
Defn:
Software testing is a method to check whether the
actual software product matches expected
requirements and to ensure that software product
is Defect free.
3. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
1. Infamous Software Error Case Studies
2. What Is a Bug?
3. Why Do Bugs Occur?
4. The Cost of Bugs
5. What Exactly Does a Software Tester Do?
6. What Makes a Good Software Tester?
4. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
Infamous Software Error Case Studies
Software is everywhere. But ultimately, it's written
by people so it's not perfect.
Example
ī Intel Pentium Floating-Point Division Bug, 1994
ī Patriot Missile Defense System, 1991
ī The Y2K (Year 2000) Bug, Circa 1974
5. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
What Is a Bug?
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.
6. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
Why Do Bugs Occur?
1. The software does something that the product
specification says it shouldn't do.
2. The software does something that the product
specification doesn't mention.
3. The software doesn't do something that the
product specification doesn't mention but should.
4. The software is difficult to understand, hard to
use, slow, or in the software tester's eyes will be
viewed by the end user as just plain not right.
7. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
The Cost of Bugs
Software doesn't designed automatically, there is a
procedure that is followed which may cover
inception to planing, programming, and testing.
That means the cost of bug is logarithmic. The cost
of bug is logarithmic. The cost of bug is
logarithmic.
8. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
What Exactly Does a Software Tester Do?
The goal of a software tester is to find bugs. But if
the software is tested to check that it will work is
wrong approach, because if we use this kind of
approach then we are missing the bugs.
9. Software Testing - Introduction
SOFTWARE TESTING BACKGROUND
What Makes a Good Software Tester?
Now a days most of the companies consider
software testing as a technical engineering
profession. They know to build the better quality
software there is need of well qualified and
trained software testers.
10. Software Testing - Introduction
SOFTWARE BUGS
Bug in software testing is flaw or default in a
component or system or software that can cause
the components or system to fail to perform its
required functions, in other words, we can say that
if the bug or defect encountered during the
execution of the test, it may cause the failure of
the components.
11. Software Testing - Introduction
SOFTWARE BUGS
Life Cycle of Bug in Software Testing
The Bug Life cycle is also known as a Defect Life
cycle. It is a phase of a defect that occupies the
different states during its lifetime.
12. Software Testing - Introduction
SOFTWARE BUGS
Life Cycle of Bug in Software Testing
13. Software Testing - Introduction
SOFTWARE BUGS
How to Identify a Software Bug
ī Sighting
ī Symptom
ī Reproducer
ī Description
ī Failure
ī Cause-Effect Chain
ī Defect
14. Software Testing - Introduction
COST OF BUGS
The cost of defects can be measured by the impact
of the defects and when we find them. Earlier the
defect is found lesser is the cost of defect.
The presence of bugs in a system is inevitable, and
knowing the cost of a software bug and
performing tests thoroughly is a must as well.
15. Software Testing - Introduction
SOFTWARE TESTING REALITIES
Testers testing the software should have in-depth
knowledge about its various facets. It is a
complicated process. If the testers do any mistake,
the overall performance of the software will go
down.
17. Software Testing - Introduction
TESTING AXIOMS
Axiom 1
It is impossible to test a program completely.
ī How many test cases do you need to exhaustively
test.
ī The only way to be absolutely sure software works
is to run it against all possible inputs and observe
all of its outputs.
ī The number of possible inputs is very large.
18. Software Testing - Introduction
TESTING AXIOMS
Axiom 2
Software testing is a risk-based exercise.
ī If you do not test the software for all inputs (a
wise choice) you take a risk.
ī Hopefully you will skip a lot of inputs that work
correctly.
ī What if you skip inputs that cause a fault?
19. Software Testing - Introduction
TESTING AXIOMS
Axiom 3
Testing cannot show the absence of bugs.
1. âProgram testing can be used to show the
presence of bugs, but never to show their absenceâ
2. Dijkstra received the 1972 ACM Turing Award
for fundamental contributions in the area of
programming language.
20. Software Testing - Introduction
TESTING AXIOMS
Axiom 4
The more bugs you find, the more bugs there are
ī Bugs appear in groups, where you see one you will
likely find more âĻ Why?
ī Boris Beizer coined the term pesticide paradox to
describe the phenomenon that the more you test
software the more immune it becomes to your test
cases.
21. Software Testing - Introduction
TESTING AXIOMS
Axiom 5
Not all bugs found will be fixed
Why wouldnât you fix a bug you knew about?
ī Thereâs not enough time
ī Itâs not really a bug
ī Itâs too risky to fix
22. Software Testing - Introduction
TESTING AXIOMS
Axiom 6
It is difficult to say when a bug is indeed a bug.
ī If there is a problem in the software but no one
ever discovers it âĻ is it a bug?
ī What is your opinion? Does a bug have to be
observable in order for it to me a bug?
ī Bugs that are undiscovered are called latent bugs.
23. Software Testing - Introduction
TESTING AXIOMS
Axiom 7
Specifications are never final
ī Building a product based on a âmoving targetâ
specification is fairly unique to software
development.
ī Not true in other engineering domains.
24. Software Testing - Introduction
TESTING AXIOMS
Axiom 8
Software testers are not the most popular
members of a project
1. Goal of a software tester
2. Tips to avoid becoming unpopular
25. Software Testing - Introduction
TESTING AXIOMS
Axiom 9
Software testing is a disciplined and technical
profession.
ī When software was simpler and more manageable
software testers were often untrained and testing
was not done methodically.
ī It is now too costly to build buggy software. As a
result testing has matured as a discipline.
26. Software Testing - Introduction
PRECISION AND ACCURACY
Definition of Precision
Precision is defined as âthe quality of being exactâ
and refers to how close two or more
measurements are to each other, regardless of
whether those measurements are accurate or not.
It is possible for precision measurements to not be
accurate.
27. Software Testing - Introduction
PRECISION AND ACCURACY
Definition of Accuracy
Accuracy is defined as âthe degree to which the
result of a measurement conforms to the correct
value or a standardâ and essentially refers to how
close a measurement is to its agreed value.
28. Software Testing - Introduction
VERIFICATION AND VALIDATION
Verification
Verification is the process, to ensure that whether
we are building the product right i.e., to verify the
requirements which we have and to verify
whether we ae developing the product accordingly
or not.
30. Software Testing - Introduction
VERIFICATION AND VALIDATION
Validation
Validation is the process, whether we are building the
right product i.e., to validate the product which we
have developed is right or not.
In software testing, verification and validation are the
processes to check whether a software system meets
the specifications and that it fulfills its intended
purpose or not.
31. Software Testing - Introduction
VERIFICATION AND VALIDATION
Validation
Validation is the process, whether we are building the
right product i.e., to validate the product which we
have developed is right or not.
In software testing, verification and validation are the
processes to check whether a software system meets
the specifications and that it fulfills its intended
purpose or not.
33. Software Testing - Introduction
QUALITY AND RELIABILITY
Quality
Quality is a much broader aspect than Reliability.
Quality covers almost everything from
organisation, managements, service, procedures,
people, product, product-life etc. In simple words,
Reliability is only a subset of quality.
34. Software Testing - Introduction
QUALITY AND RELIABILITY
Reliability Testing
Reliability Testing is a software testing process that
checks whether the software can perform a
failure-free operation for a specified time period in
a particular environment.
36. Software Testing - Introduction
TESTING AND QUALITY ASSURANCE
Software quality assurance helps to check the
fulfilment of all business scenarios and user
requirements, as well as identify all possible
problems and bugs in IT products.
37. Software Testing - Introduction
TESTING AND QUALITY ASSURANCE
Quality assurance (QA) is the process of validating
whether a product fulfills a company or industryâs
quality requirements or not. Itâs an essential part
of ensuring the quality of production and includes
processes such as planning, fulfilling, and
monitoring.
38. Software Testing - Introduction
TESTING AND QUALITY ASSURANCE
Quality Assurance Process
Quality assurance breaks down to a defined cycle known as
the Deming cycle. Many professionals call it the PDCA cycle
because of the phases used in this cycle, which are:
ī Plan
ī DoCheck
ī Act
40. Software Testing - Introduction
TESTING AND QUALITY ASSURANCE
Manual software testing
Đanual software testing is a type of software testing
when a QA engineer manually runs tests without any
automation.
Automated software testing
Automated software testing is performed using
frameworks such as Selenium, PHPUnit, Mockery. It
aims to reduce the cost and risks related to the human
factor.
41. SOFTWARE TESTING METHODOLOGY
FUNCTIONAL TESTING
Functional testing is the process through which QAs determine if a piece of
software is acting in accordance with pre-determined requirements.
It uses black-box testing techniques, in which the tester has no knowledge of
the internal system logic.
43. SOFTWARE TESTING METHODOLOGY
FUNCTIONAL TESTING
Types of Functional Testing
Unit Testing
This is performed by developers who write scripts that test if individual
components/units of an application match the requirements.
Smoke Testing:
This is done after the release of each build to ensure that software stability
is intact and not facing any anomalies.
44. SOFTWARE TESTING METHODOLOGY
FUNCTIONAL TESTING
Types of Functional Testing
Sanity Testing
Usually done after smoke testing, this is run to verify that every major
functionality of an application is working perfectly, both by itself and in
combination with other elements.
Regression Testing
This test ensures that changes to the code base (new code, debugging
strategies, etc.) do not disrupt the already existing functions or trigger
some instability.
45. SOFTWARE TESTING METHODOLOGY
FUNCTIONAL TESTING
Process Workflow for Functional Testing
īIdentify functions that the application is intended to
perform
īCreate the input based on the functionâs specifications
īEstablish the output based on the functionâs specifications
īExecute the written test cases
īCompare the final actual and expected outputs
47. SOFTWARE TESTING METHODOLOGY
FUNCTIONAL TESTING
Advantages of Functional Testing:
īIt ensures to deliver a bug-free product.
īIt ensures to deliver a high-quality product.
īNo assumptions about the structure of the system.
īThis testing is focused on the specifications as per the
customer usage.
48. SOFTWARE TESTING METHODOLOGY
STRUCTURAL TESTING
The process is a combination of white-box testing and glass
box testing mostly performed by developers.
Structural Testing Techniques
īStatement coverage
īBranch coverage
īCondition Coverage
51. SOFTWARE TESTING METHODOLOGY
STRUCTURAL TESTING
Types of Structural Testing
Control flow testing
This method requires detailed knowledge of all aspects of the software and
the logic of the software. It tests out the whole code thoroughly.
Data flow testing:
The data is kept safe and unaltered throughout the execution of the
program. Any alteration of the data can result in adverse consequences.
52. SOFTWARE TESTING METHODOLOGY
STRUCTURAL TESTING
Slice based testing:
The basic idea is to divide the whole program into small slices and
then checking on to each slice carefully.
Mutation testing:
The developers make small alterations to the already available
software tests and create a mutant of the old software test.
53. SOFTWARE TESTING METHODOLOGY
STRUCTURAL TESTING
Advantages of Structural Testing
īEnables thorough checkups
īSmooth execution from an early stage
īDead codes are removed easily
īAutomated processes
īEasy coding and implementation
54. SOFTWARE TESTING METHODOLOGY
STATIC AND DYNAMIC TESTING
Static testing
Static testing is cost-effective testing where defects are
identified without actual execution of the code.
Static Testing Techniques
īReview
īStatic Analysis
55. SOFTWARE TESTING METHODOLOGY
STATIC AND DYNAMIC TESTING
Dynamic testing
Dynamic Testing is executing codes with different variables
for physical examination of the system.
Dynamic Testing Techniques
īWhite Box Testing
īBlack Box Testing
56. SOFTWARE TESTING METHODOLOGY
STATIC AND DYNAMIC TESTING
White Box Testing
The white box testing is done keeping transparency between the tester and
the system. This means the tester is aware of all the internal working and
the codes.
Black Box Testing
This is performed by the testers or the testing team who are unaware of
the built and codes of the system. The goal is to only verify the functionality
of the system against any input.
57. SOFTWARE TESTING METHODOLOGY
LOW LEVEL SPECIFICATION TEST TECHNIQUES
A Low Level Test Case is a test case with solid values
for input data and expected output.
The logical operators from high-level test cases are
interchanged with the real values that go along
with the targets of the logical operators.
58. SOFTWARE TESTING METHODOLOGY
EQUIVALENCE PARTITIONING
Equivalence partitioning (EP) is a specification-based or black-box
technique. It can be applied at any level of testing and is often a good
technique to use first.
59. SOFTWARE TESTING METHODOLOGY
DATA TESTING
Defn:
Database Testing is checks the schema, tables, triggers, etc. of the Database
under test. It also checks data integrity and consistency.
61. SOFTWARE TESTING METHODOLOGY
STATE TESTING
State Transition Testing is a black box testing technique in which changes made
in input conditions cause state changes or output changes in the Application
under Test (AUT).
State transition testing helps to analyze behaviour of an application for
different input conditions.
63. SOFTWARE TESTING METHODOLOGY
FORMAL REVIEWS
Formal reviews follow a formal process. It is well structured and regulated.
Process of formal review
ī Planning
ī Kick-off
ī Preparation
ī Review meeting
ī Rework
ī Follow-up
65. SOFTWARE TESTING METHODOLOGY
CODING STANDARDS AND GUIDELINES
Software developers globally adhere to certain coding standards to maintain a
quality development environment.
Coding standards best practices are best defined as an assortment of essential
rules, best practices, and guidelines to help programmers write good and
cleaner code.
67. SOFTWARE TESTING METHODOLOGY
CODE REVIEW CHECKLIST
A code review aims to improve the quality of the code that you want
to add to your codebase.
A code review refers to a systematic approach to reviewing other
programmers' code for mistakes and many other quality metrics
69. SOFTWARE TESTING METHODOLOGY
DATA COVERAGE
Data coverage means at least one test case for each data item /
variable / field in the program.
Collecting all inputs to each function to figure out missing test data.
70. SOFTWARE TESTING METHODOLOGY
CODE COVERAGE
Code Coverage testing is determining how much code is being tested. It can be
calculated using the formula:
Types of code coverage Analysis:
ī Statement coverage and Block coverage
ī Function coverage
ī Function call coverage
ī Branch coverage
ī Modified condition/decision coverage
71. CONFIGURATION TESTING
Definition of Configuration testing
Configuration Testing is a software testing technique in which
the software application is tested with multiple combinations
of software and hardware in order to evaluate the functional
requirements.
73. BENEFITS OF AUTOMATION AND TOOLS
Automation testing uses an automation tool to execute the
test case instead of a human manually executing the suite by
following step-by-step instructions.
74. BENEFITS OF AUTOMATION AND TOOLS
Benefits of Automation and Tools
ī Enhanced Results
ī Swifter Feedback system
ī Brand Enhancement
ī Cost-effective
ī Efficiency Testing
ī Increase in Coverage Area
75. VIEWERS AND MONITORS
âTesting the Software with X- Ray Glasses,â you learned how
code coverage analyzers provide a means for you to see what
lines of code are executed, what functions are run, and what
code paths are followed when you run your tests.
77. VIEWERS AND MONITORS
Drivers are tools used to control and operate the software
being tested. One of the simplest examples of a driver is a
batch file, a simple list of programs or commands that are
executed sequentially.
78. STUBS
Stubs are essentially the opposite of drivers in that they donât
control or operate the software being tested; they instead
receive or respond to data that the software sends.
79. STRESS AND LOAD TOOLS
Stress and load tools induce stresses and loads to the
software being tested. A word processor running as the only
application on the system, with all available memory and disk
space, probably works just fine.
80. ANALYSIS TOOLS
Most software testers use the following common tools to
make their everyday jobs easier. Theyâre not necessarily as
fancy as the tools discussed so far.
81. SOFTWARE TEST AUTOMATION
Software test automation is just another class of software
testing tools, itâs one that deserves special consideration.
ī Macro Recording and Playback
ī Programmed Macros
82. RANDOM TESTING
Using tools and automation for this purpose will help you find
bugs; while the tools are busy doing regression testing, youâll
have time to plan new tests and design new and interesting
cases to try.
83. BETA TESTING
Beta testing is the term used to describe the external testing
process in which the software is sent out to a select group of
potential customers who use it in a real- world environment.
84. BETA TESTING
Beta testing is the term used to describe the external testing
process in which the software is sent out to a select group of
potential customers who use it in a real- world environment.
85. GOAL OF TEST PLANNING
The test plan is a project-level document which means that it is
focused on a specific software product rather than on procedures
and standards adopted across the entire company.
86. GOAL OF TEST PLANNING
1. To evaluate the work products such as requirements, design,
user stories, and code
2. To verify the fulfillment of all specified requirements
3. To validate if the test object is complete and works as per the
expectation of the users and the stakeholders
87. GOAL OF TEST PLANNING
4. To build confidence in the quality level of the test object
5. To prevent defects in the software product
6. To find defects in the software product
88. GOAL OF TEST PLANNING
7. To provide sufficient information to stakeholders to allow
them to make informed decisions, especially regarding the level of
quality of the test object
8. To reduce the level of risk of insufficient software quality
9. To comply with contractual, legal, or regulatory requirements
or standards, and to verify the test objectâs compliance with such
requirements or standards
89. TEST PHASES
To plan the test phases, the test team will look at the
proposed development model and decide whether
unique phases, or stages, of testing should be
performed over the course of the project.
90. TEST PHASES
The test planning process should identify each proposed test phase
and make each phase known to the project team. This process often
helps the entire team form and understand the overall development
model.
91. TEST STRATEGY
The test strategy describes the approach that the test team will use
to test the software both overall and in each phase.
92. TEST STRATEGY
Deciding on the strategy is a complex task â one that needs to be
made by very experienced testers because it can determine the
success or failure of the test effort.
Itâs vitally important for everyone on the project team to understand
and be in agreement with the proposed plan.
93. RESOURCE REQUIREMENTS
Planning the resource requirements is the process of deciding whatâs
necessary to accomplish the testing strategy. Everything that could
possibly be used for testing over the course of the project needs to
be considered.
95. TEST SCHEDULE
The test schedule takes all the information presented so far and
maps it into the overall project schedule.
This stage is often critical in the test planning effort because a few
highly desired features that were thought to be easy to design and
code may turn out to be very time consuming to test.
96. WRITING AND TRACKING TEST CASES
Writing and tracking test cases, is one that more directly influences
your typical tasks as a software tester.
Initially you may be involved only in running test cases that someone
else has written, but youâll very soon be writing them for yourself
and for other testers to use.
97. WRITING AND TRACKING TEST CASES
ī Why writing and tracking test cases is important
ī What a test design specification is
ī What a test case specification is
ī How test procedures should be written
ī How test cases should be organized
98. WRITING AND TRACKING TEST CASES
ī Why writing and tracking test cases is important
ī What a test design specification is
ī What a test case specification is
ī How test procedures should be written
ī How test cases should be organized