Documente Academic
Documente Profesional
Documente Cultură
Fundamentals
Of
Software Testing
By
Shampa Dey, Project Engineer
Contents
• Objectives of Software Testing
• Software Testing – start and end
• Software Testing Principles
• Error, Fault and Failure
• Defect - Severity and Priority
• Verification and Validation
• Software Quality
• Importance of Software Quality
• Dimensions of Software Quality
10/25/2019 www.cdac.in 2
1
25-10-2019
Finding as many defects as possible which may get created by the programmer while
developing the software
Writing high quality test cases
Prevent defects
Confirm that system satisfies the business requirements
To check if the application meets the system requirement specifications
Gain customer confidence by providing them with a quality product
Gaining confidence in the level of quality of the product
10/25/2019 www.cdac.in 3
Testing Fundamentals
Why to test?
Testing becomes absolutely essential to make sure the software works properly and
does the work that it is meant to perform.
What to test?
Any working product which forms part of the software application has to be
tested - Hardware, Software, Test Data.
10/25/2019 www.cdac.in 4
2
25-10-2019
Testing Fundamentals
How often to test ?
10/25/2019 www.cdac.in 5
No project extension
The deadline is fixed
S E
T N
A Planning Analysis Coding Test
D
R
T Reality when project is executed
10/25/2019 www.cdac.in 6
3
25-10-2019
10/25/2019 www.cdac.in 7
Testing can be started from the Requirements Gathering phase and continued till
the deployment of the software.
10/25/2019 www.cdac.in 8
4
25-10-2019
The following aspects are to be considered for stopping the testing process
Testing Deadlines
Completion of test case execution
Completion of functional and code coverage to a certain point
Bug rate falls below a certain level and no high-priority bugs are identified
Management decision
10/25/2019 www.cdac.in 9
10/25/2019 www.cdac.in 10
5
25-10-2019
10/25/2019 www.cdac.in 11
Consider a scenario where you are moving a file from Folder A to Folder B. Think of all the
possible ways you can test this. Apart from the usual scenarios, you can also test the following
conditions –
Trying to move the file when it is Open
You do not have the security rights to paste the file in Folder B
Folder B is on a shared drive and storage capacity is full.
Folder B already has a file with the same name
Or suppose you have 15 input fields to test, each having 5 possible values, the number of
combinations to be tested would be 5^15 = 75
• If you were to test the entire possible combinations project EXECUTION TIME & COSTS would rise.
So we need certain principles and strategies to optimize the testing effort.
10/25/2019 www.cdac.in 12
6
25-10-2019
10/25/2019 www.cdac.in 13
10/25/2019 www.cdac.in 14
7
25-10-2019
By experience, you can identify such risky modules. But this approach has its
own limitations
If the same tests are repeated over and over again, eventually the same test cases will no
longer find new bugs.
10/25/2019 www.cdac.in 15
Repetitive use of the same pesticide mix to eradicate insects during farming will over
time lead to the insects developing resistance to the pesticide.
If the same set of repetitive tests are conducted, the method will be useless for
discovering new defects.
To overcome this -
Test cases need to be regularly reviewed & revised, adding new & different test cases to help find
more defects.
Testers cannot simply depend on existing test techniques. He must look out continually to improve
the existing methods to make testing more effective.
But even after all this hard work in testing, you can never claim your product is bug-free.
10/25/2019 www.cdac.in 16
8
25-10-2019
Testing talks about the presence of defects and don’t talk about the absence of
defects.
Software Testing reduces the probability of undiscovered defects remaining in the
software.
Even if no defects are found, it is not a proof of correctness.
But what if, you work extra hard, taking all precautions & make your
software product 99% bug-free. And the software does not meet the needs
& requirements of the clients.
This leads us to our next principle - Absence of Error
10/25/2019 www.cdac.in 17
How ?
System is tested thoroughly for the wrong requirements.
Software testing is not merely finding defects, but also to check that software
addresses the business needs.
Finding and fixing defects does not help if the system build is unusable and does not
fulfill the user's needs & requirements.
10/25/2019 www.cdac.in 18
9
25-10-2019
10/25/2019 www.cdac.in 19
10/25/2019 www.cdac.in 20
10
25-10-2019
• Learning testing principles is just like learning to drive for the first time.
Initially, you pay attention to each and everything like gear shifts, speed, clutch
handling, etc.
But with experience, you just focus on driving the rest comes naturally.
You even hold conversations with other passengers in the car.
10/25/2019 www.cdac.in 21
10/25/2019 www.cdac.in 22
11
25-10-2019
10/25/2019 www.cdac.in 23
Fault in Software
System Failure
Human makes error
10/25/2019 www.cdac.in 24
12
25-10-2019
Defect
Defect – non-conformance to requirements or functional specification.
It is something that does not correspond to valid Customer’s expectations that are
assumed but may be not described in product requirements.
Expected Result – the behavior of the system (software product) we expect to see in
result of our actions (inputs). In other words – this is correct behavior of the software
product.
If the actual behavior of the program we see does not correspond to that one which we
expect (not the same), such behavior may be considered as wrong and we mat say that
we have found the defect.
10/25/2019 www.cdac.in 25
Severity of a Defect
Severity is defined as the
10/25/2019 www.cdac.in 26
13
25-10-2019
Priority of a Defect
Priority is defined as the
10/25/2019 www.cdac.in 27
10/25/2019 www.cdac.in 28
14
25-10-2019
10/25/2019 www.cdac.in 29
Verification
The verifying process includes checking documents, design, code, and
program.
10/25/2019 www.cdac.in 30
15
25-10-2019
Validation
Validation is a dynamic mechanism of software testing and validates
the actual product.
Validation is the process to make sure the product satisfies the specified
requirements at the end of the development phase
Validation involves actual testing
Validation takes place after verifications are completed
10/25/2019 www.cdac.in 31
SRS : A clickable button with name Submet SRS : A clickable button with name Submit
Verification checks SRS, design doc Validation tests the software and
and corrects spelling finds button not clickable
Submit
Submet Submit
10/25/2019 www.cdac.in 32
16
25-10-2019
Comparison - Verification vs
Validation
VERIFICATION VALIDATION
Verification is the process of evaluating product of a Validation is the process of evaluating software at the
development phase to find out whether they meet the end of the development process to determine whether
specified requirements. software meets the customer expectations and
requirements.
It answers the question “Are we building the system It answers the question “Are we building the right
right?” system?”
Inspections, Reviews, Walkthroughs are methods of Testing the software application is the method of
verification. validation.
10/25/2019 www.cdac.in 33
SOFTWARE QUALITY
10/25/2019 www.cdac.in 34
17
25-10-2019
Software Quality
As with any definition, the definition of ‘software quality’ is also
varied and debatable.
Some say that ‘quality’ cannot be defined.
Can be defined but only in a particular context.
‘quality is simply a lack of bugs’.
10/25/2019 www.cdac.in 35
Software Quality
SOFTWARE QUALITY is the degree of conformance to explicit or
implicit requirements and expectations.
Explanation
Explicit: clearly defined and documented
Implicit: not clearly defined and documented but indirectly suggested
Requirements: business/product/software requirements
Expectations: mainly end-user expectations
10/25/2019 www.cdac.in 36
18
25-10-2019
Software Quality
Definition by IEEE (Institute of Electrical and Electronics Engineers)
10/25/2019 www.cdac.in 37
Software Quality
Definition by
ISTQB (International Software Testing Qualifications Board)
10/25/2019 www.cdac.in 38
19
25-10-2019
10/25/2019 www.cdac.in 39
10/25/2019 www.cdac.in 40
20
25-10-2019
Compatibility:
suitable in different environments
different devices, operating systems and browsers
Concurrency:
Service multiple requests to the same resources at the same time.
10/25/2019 www.cdac.in 41
Installability:
The ability of software to be installed in a specified environment.
Localizability:
The ability of software to be used in different languages, time zones, etc.
10/25/2019 www.cdac.in 42
21
25-10-2019
Reliability:
The ability of software to perform a required function under stated conditions for the stated
period of time without any errors
Scalability:
Ability to increase or decrease in performance in response to changes in software’s
processing demands.
10/25/2019 www.cdac.in 43
Testability:
The ability of software to be easily tested.
Usability:
The degree of software’s ease of use.
10/25/2019 www.cdac.in 44
22
25-10-2019
Maintainability:
The ease with which software can be modified
adding features, enhancing features, fixing bugs, etc.
Portability:
The ability of software to be transferred easily from one location to another.
10/25/2019 www.cdac.in 45
Thank you
10/25/2019 www.cdac.in 46
23