2. Aim
To equip the students with fundamentals of software
testing and its various types
3. Instructional Objectives
After completing this chapter, you should be able to:
• Describe the fundamental concepts of software testing
• Outline the taxonomy of software testing
• Explain the types of software testing
• Describe black box testing, white box testing and grey box testing
4. Learning Outcomes
At the end of this chapter, you are expected to:
• Explain taxonomy and concepts used for software testing
• Elaborate the principles of software testing
• Describe the different types of software testing
• Mention the advantages and disadvantages of white box testing and black
box testing
• Differentiate between black box, white box and grey box testing
5. Objective 1
Describe the Fundamental Concepts of Software Testing
Introduction
Testing
Fundamentals
6. Introduction
.
“Software Testing is all about evaluating a software product or a system along with
its components, to check if it meets the specified requirements or not.”
“Software testing is an iterative process.”
“Different testing methodologies are used at different stages of the software
development.”
7. Testing Fundamentals
• Software quality: Degree of conformity of the software to a variety of
expectations and requirements.
• Dimensions of Quality: Some of the key dimensions of software quality are
compatibility, accessibility, robustness efficiency, flexibility, concurrency and
conformity.
• Software Quality Assurance: It is a set of activities that ensures the quality in
each and every step of software engineering process.
8. Testing Fundamentals
• Software Quality Control: Set of activities that ensure that the software that is
being built is of highest quality across all dimensions mentioned above.
• Software Development Life Cycle: It is a sequence of steps followed in
software development process to develop the required software as per
specifications.
• Software Testing Methodologies: Various methods used for testing the
software at different stages of software development.
9. Testing Fundamentals
• Black Box Testing: Where the internal structure or design of the component or
module that is being tested is unknown to the person who performs the tests.
• White Box Testing: Where the internal structure or design of the component
or module that is being tested is known to the person who performs the tests
• Grey Box Testing: When both black box testing and white box testing are
combined and performed on a specific module or component.
11. Quiz / Assessment
1) White Box Testing is a software testing method in which the
internal structure or design or implementation of the item being
tested is known to the tester
a) True
b) False
2) Black Box Testing is a software testing method in which the
internal structure or design or implementation of the item being
tested is not known to the tester
a) True
b) False
12. Quiz / Assessment
3) ______________is the degree of conformance to explicit or implicit
requirements and expectations.
a) Software quality
b) Software metric
c) Software test
d) Both a and b
14. Taxonomy of Software Testing
” There are various testing methods and testing techniques used for a wide variety
of purposes throughout the software development life cycle.”
“To ensure efficiency of software testing, a taxonomy was developed which
organizes 200 types of testing types into a structure.”
“The execution of an object under test (OUT) under specific preconditions with
specific stimuli so that its actual behaviour can be compared with its expected or
required behaviour.”
15. Taxonomy of Software Testing
“Testing and evaluation are part of Verification and Validation (V&V) methods and
Quality Control (QC).”
16. Taxonomy of Software Testing
“These questions were the foundations of organising the taxonomy of testing
types.” What are we testing?
When are we testing?
Why are we testing?
Who is performing the testing?
Where is the testing taking place?
How are we testing?
How well are the objects-under-test functioning?
18. Quiz / Assessment
1) Different types of testing rectifies different kinds of defects
a) True
b) False
2) Defect Detection Efficiency (DDE) is the number of defects
detected during a phase/stage that are injected during that same
phase divided by the total number of defects injected during that
phase.
a) True
b) False
19. Quiz / Assessment
3) Testing practitioners can also be challenged to examine and
determine the degree of completeness of Personal testing
expertise, experience and training and
a) Test programs and associated test planning
b) Only test programs
c) Only planning
d) None of the above
21. Types of Software Testing
“Based on the preconditions, internal and external stimuli, there are a variety of
testing types.”
Black box testing White box testing Unit testing Incremental integration testing
Integration testing Functional testing System testing End to end testing
Sanity testing Regression testing Acceptance testing Install/uninstall testing
Load testing Stress testing Comparison testing Compatibility testing
Usability testing Recovery testing Security testing Performance testing
Alpha testing Beta testing
22. Types of Software Testing
• “Black Box testing : Internal system design or code structure is not known to
the tester.”
• “White Box Testing : Internal structure or design of the component or module
that is being tested is completely known to the person who performs the tests.”
• “Unit Testing : Testing of individual units otherwise referred to as software
components or modules”
• “Incremental Integration Testing : This is bottom approach for testing.”
23. Types of Software Testing
• “Integration Testing : All the units or individual modules are integrated and
testing is done to verify if the integrated system works as expected.”
• “System Testing : The complete system with all modules & sub-components
are tested.”
• “End-to-end Testing : Tries to simulate the whole application environment as
like how it needs to operate in the real world and then test the whole system.”
24. Types of Software Testing
• “Sanity Testing : Sanity testing is performed in order to determine if a new
version of a software application is working as per requirements.”
• “Regression Testing : Testing the entire application and its functionality.”
• “Acceptance Testing : Testing for customer specified requirements.”
• “Load Testing : An automated testing tool which can simulate the number of
requests sent is used to check the performance of the system.”
25. Types of Software Testing
• “Performance Testing : Tested to check whether the system meets
performance requirements.”
• “Usability Testing : Testing of application flow and to check whether the new
user can understand the application easily.”
• “Recovery Testing : When there is an operating system or hardware crash, how
well the software tackles it and recovers as a whole along with stored data, is
tested in recovery testing.”
• “Security Testing : This testing checks for the security of the software.”
26. Types of Software Testing
• “Compatibility Testing : Compatibility and performance of the software on a
variety of hardware devices is tested here.”
• “Comparison testing : The present version is compared against the previous
versions and checked for its robustness, and efficiency of upgrades.”
• “Alpha Testing : This test is done in house where virtual user environment is
created for this type of testing.”
• “Beta Testing : This testing is typically done by specific set of end users, testing
happens in real time.”
27. Quiz / Assessment
1) Performance testing is similar to load test
a) True
b) False
2) Usability testing is user friendly check
a) True
b) False
3) It’s a performance testing to check the system behaviour under
load
a) Load test
b) Performance test
c) Stress test
d) None of the above
28. Objective 4
Describe Black Box Testing, White Box Testing and Grey Box Testing
Black Box
Testing
White Box
Testing
Grey Box
Testing
29. Black Box Testing
“Where the internal structure or design of the component or module that is being
tested, is unknown to the person who performs the test.”
“Black box testing looks at the functionality as a whole.”
30. Black Box Testing
Advantages
• Tester need not have the knowledge of code and hence internal working of
the software
• Clearly indicates any discrepancies in the software functionality
Disadvantages
• All the test inputs should be derived from a large set of requirements
• Possibility of many false alarms as the tester is completely unaware of
internal working of the code
31. Black Box Testing
Methods of Black Box Testing
• Graph Based Testing Method
• Error Guessing
• Boundary Value Analysis
• BVA Techniques
• Equivalence Partitioning
• Comparison Testing
32. Black Box Testing
• Graph Based Testing Method : All objects are identified and graph is prepared
based on cause and effect (or) inputs and respective outputs. From this graph
each object is identified and test cases are written to discover the errors.
• Error Guessing : If the tester had already tested the application or any
previous versions, then he might have an understanding about where potential
errors can pop up.
33. Black Box Testing
• Boundary Value Analysis : Boundary Value Analysis (BVA) is one of the
Functional Testing techniques wherein the extreme boundaries are chosen.
• Equivalence Partitioning : This method divides the test inputs into different
classes of data.
• Comparison Testing : Different versions of same software are used to compare
with each other for testing in this method.
34. White Box Testing
“Structural testing is also known as glass box testing or white box testing. It is
approach where the tests are derived from the knowledge of the software’s
structure or internal implementation.”
Why do we do White Box Testing?
• To ensure all independent paths within a module have been functioning well
• To ensure all logical decisions are verified on their true and false values
• To ensure all loops executed inside and outside their boundaries are valid
35. White Box Testing
“There are few methods under structural testing based on the areas covered.”
• Statement Coverage : Aimed at exercising all programming statements with
minimal tests.
• Branch Coverage : Running a series of tests to ensure that all branches are
tested at least once.
• Path Coverage : Corresponds to testing all possible paths which means that
each statements and branches are covered.
36. White Box Testing
Advantages
• Forces test developer to reason carefully about implementation
• It reveals error in hidden code
• It spots the dead code and other issues
Disadvantages
• Expensive as both time and money is required
• There are a lot of possibility that few lines of code is missed accidentally
• In depth knowledge is required for performing this testing
37. Grey Box Testing
“Grey Box testing technique where the tester performs relevant tests on a system
having a partial understanding of the design and internal structure.”
Different testing techniques under grey box testing are:
Regression testing Pattern testing Matrix testing Orthogonal array testing
38. Grey Box Testing
Advantages
• Gives a blend of benefits of both black and white box testing
• Grey-box tester handles design complex test scenario more intelligently
• Maintains the boundary between independent testers and developers
Disadvantages
• Complete white box testing cannot be done
• It is difficult to associate defects for a distributed systems
39. Comparison among White Box, Black Box and Grey Box Testing
Black Box Testing Grey Box Testing White Box Testing
Internal programming not known
Internal programming partially
known
Internal programming fully known
Known as closed box, data driven and
functional testing
Known as translucent testing
Known as glass, open box, clear box,
structural testing or code based
testing
Done by end users and also by testers
and developers
Done by end users and also by testers
and developers
Done by testers and developers
Least time consuming and exhaustive Partly time consuming and exhaustive Most exhaustive and time consuming
Not suited to algorithm testing Not suited to algorithm testing Suited to algorithm testing
40. Quiz / Assessment
1) Error guessing is not black box test
a) True
b) False
2) Tester can be non-technical in black box testing.
a) True
b) False
3) Comparison testing compares the present version of the software
with
a) Another software
b) Requirements specification
c) Future versions
d) Previous versions
41. Quiz / Assessment
4) Structural testing is also known as glass box testing
a) True
b) False
5) This technique is aimed at exercising all programming statements
with minimal tests
a) Statement coverage
b) Branch coverage
c) Both a and b
d) None
42. Quiz / Assessment
6) This technique corresponds to testing all possible paths which
means that each statements and branches are covered.
a) Statement coverage
b) Branch coverage
c) Both a and b
d) None
43. “Software Testing is all about evaluating a software product or a
system along with its components, to check if it meets the specified
requirements or not.”
Video Lecture Explanation
44. Summary
Software testing helps in finalizing the software application or product against
business and user requirement
Test techniques include a process of executing a program or application with
the intent of finding software bugs which are errors or defect
Testing is the process of evaluating a system
Software testing is an investigation conducted to provide stakeholders with
information about the quality of the product or service under test
Software quality: Software quality is the degree of conformance to explicit or
implicit requirements and expectations.
45. Summary
White Box Testing: It is a software testing method where the internal
structure or design or implementation of the item being tested is known to the
tester
Black Box Testing: It is a software testing method in which the internal
structure or design or implementation of the item being tested is not known to
the tester
Agile Testing: It is a software testing method which follows the principles of
agile software development
Different types of testing rectifies different kinds of defects and gives different
defect removal rates (DRR).
46. Summary
Structural Testing is also known as glass box testing or white box testing
Grey Box Testing: It is a software testing method which is a combination of
Black and White Box testing methods
Grey Box Testing: It provides combined benefits of both black and white box
testing
47. e-References
• Guru99 (2016). “Regression Testing”. Retrieved on 20 April 2016 from
http://www.guru99.com/regression-testing.htm
• TechTarget (2016). “Grey Box Testing”. Retrieved on 20 April 2016 from
http://searchsoftwarequality.techtarget.com/definition/gray-box
• Tutorials point (2016). “Software Implementation”. Retrieved on 20 April 2016 from
http://www.tutorialspoint.com//software_engineering/software_implementation.htm
48. e-References
• Tutorials point (2016). “Structural Testing”. Retrieved on 20 April 2016 from
http://www.tutorialspoint.com/software_testing_dictionary/structural_testing.htm
• Tutorials point (2016). “Black Box Testing”. Retrieved on 20 April 2016 from
http://www.tutorialspoint.com/software_testing_dictionary/black_box_testing.htm
49. External Resources
1) Roger S Pressman, Seventh Edition, Software Engineering – a practitioners
approach
2) Pratap K.J. Mohapatra , Software Engineering, A Lifecycle Approach
3) Ian Sommerville, Software engineering, sixth edition