Software Testing and Quality Assurance: Basic Concepts and Preliminaries
Software Testing and Quality Assurance: Basic Concepts and Preliminaries
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
1 © Naik & Tripathy
Outline of the Chapter
• The Quality Revolution
• Software Quality
• Role of Testing
• Verification and Validation
• Failure, Error, Fault and Defect
• The Notion of Software Reliability
• The Objectives of Testing
• What is a Test Case?
• Expected Outcome
• The Concept of Complete Testing
• The Central Issue in Testing
• Testing Activities
• Testing Level
• Source of Information for Test Selection
• White-box and Black-box Testing
• Test Planning and Design
• Monitoring and Measuring Test Execution
• Test Tools and Automation
• Test Team Organization and Management
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
2 © Naik & Tripathy
The Quality Revolution
• Started in Japan by Deming, Juran, and Ishikawa during 1940s
• In 1950s, Deming introduced statistical quality control to Japanese
engineers
• Statistical quality control (SQC) is a discipline based on
measurement and statistics
– SQC methods use seven basic quality management tool
• Pareto analysis, Trend Chart, Flow chart, Histogram, Scatter diagram,
Control chart, Cause and effect diagram
• “Lean principle” was developed by Taiichi Ohno of Toyota
“A systematic approach to identifying and eliminating waste through continuous
improvement, flowing the product at the pull of the customer in pursuit of
perfection.”
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
3 © Naik & Tripathy
The Quality Revolution
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
4 © Naik & Tripathy
The Quality Revolution
• In 1954, Juran spurred (memacu) the move from SQC to TQC (Total
Quality Control)
• Key Elements of TQC:
– Quality comes first, not short-term profits
– The customer comes first, not the producer
– Decisions are based on facts and data
– Management is participatory and respectful of all employees
– Management is driven by cross-functional committees
• An innovative methodology developed by Ishikawa called cause-
and-effect diagram
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
5 © Naik & Tripathy
The Quality Revolution
• National Broadcasting Corporation (NBC) of United States broadcast a
documentary
“If Japan Can ... Why Can’t We?” on June 24th, 1980
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
6 © Naik & Tripathy
Software Quality
• Five Views of Software Quality:
– Transcendental view
– User’s view
– Manufacturing view
– Product view
– Value-based view
• Software Quality in terms of quality factors and criteria
– A quality factor represents behavioral characteristic of a system
• Examples: correctness, reliability, efficiency, and testability
– A quality criterion is an attribute of a quality factor that is related to software
development
• Example: modularity is an attribute of software architecture
• Quality Models
Examples: ISO 9126, CMM (capability maturity model), TPI(test
process improvement), and TMM (test maturity Model)
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
7 © Naik & Tripathy
Role of Testing
• Software quality assessment divide into two categories:
– Static analysis
• It examines the code and reasons over all behaviors that might arise during
run time
– Examples: Code review, inspection, and algorithm analysis
– Dynamic analysis
• Actual program execution to expose possible program failure
• One observe some representative program behavior, and reach conclusion
about the quality of the system
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
8 © Naik & Tripathy
Role of Testing
• Software quality assessment divide into two categories:
– Static analysis
• It examines the code and reasons over all behaviors that might arise during
run time
– Examples: Code review, inspection, and algorithm analysis
– Dynamic analysis
• Actual program execution to expose possible program failure
• One observe some representative program behavior, and reach conclusion
about the quality of the system
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
9 © Naik & Tripathy
Verification and Validation
• Verification
– Evaluation of software system that help in determining whether the product of
a given development phase satisfy the requirements established before the start
of that phase
• Building the product correctly
• Validation
– Evaluation of software system that help in determining whether the product
meets its intended use
• Building the correct product
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
10 © Naik & Tripathy
Verification and Validation
• Verification
– Evaluation of software system that help in determining whether the product of
a given development phase satisfy the requirements established before the start
of that phase
• Building the product correctly
• Validation
– Evaluation of software system that help in determining whether the product
meets its intended use
• Building the correct product
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
11 © Naik & Tripathy
Failure, Error, Fault and Defect
• Failure
– A failure is said to occur whenever the external behavior of a system does not
conform to that prescribed in the system specification
• Error
– An error is a state of the system.
– An error state could lead to a failure in the absence of any corrective action by
the system
• Fault
– A fault is the adjudged (diputuskan) cause of an error
• Defect
– It is synonymous of fault
– It a.k.a. (also known as) bug
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
12 © Naik & Tripathy
The Notion of Software Reliability
• It is defined as the probability of failure-free operation of a software
system for a specified time in a specified environment
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
13 © Naik & Tripathy
The Objectives of Testing
• It does work
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
14 © Naik & Tripathy
What is a Test Case?
• Test Case is a simple pair of
<input, expected outcome>
• State-less systems: A compiler is a stateless system
– Test cases are very simple
• Outcome depends solely on the current input
• State-oriented: ATM is a state oriented system
– Test cases are not that simple. A test case may consist of a sequences of <input,
expected outcome>
• The outcome depends both on the current state of the system and the
current input
• ATM example:
< check balance, $500.00 >,
< withdraw, “amount?” >,
< $200.00, “$200.00” >,
< check balance, $300.00 >
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
15 © Naik & Tripathy
Expected Outcome
• An outcome of program execution may include
– Value produced by the program
– State Change
– A sequence of values which must be interpreted together for the outcome to be
valid
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
16 © Naik & Tripathy
The Concept of Complete Testing
• Complete or exhaustive testing means
“There are no undisclosed (dirahasiakan) faults at the end of test phase”
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
17 © Naik & Tripathy
Testing Activities
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
20 © Naik & Tripathy
Testing Level
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
21 © Naik & Tripathy
Source of Information for Test Selection
• Requirement and Functional Specifications
• Source Code
• Input and output Domain
• Operational Profile
• Fault Model
– Error Guessing
– Fault Seeding
– Mutation Analysis
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
22 © Naik & Tripathy
White-box and Black-box Testing
• White-box testing a.k.a. structural Black-box testing a.k.a. functional
testing testing
• Examines source code with focus on: Examines the program that is accessible
– Control flow from outside
– Data flow Applies the input to a program and
• Control flow refers to flow of control observe the externally visible outcome
from one instruction to another It is applied to both an entire program as
• Data flow refers to propagation of well as to individual program units
values from one variable or constant It is performed at the external interface
to another variable level of a system
• It is applied to individual units of a It is conducted by a separate software
program quality assurance group
• Software developers perform
structural testing on the individual
program units they write
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
23 © Naik & Tripathy
Test Planning and Design
• The purpose is to get ready and organized for test execution
• A test plan provides a:
– Framework
• A set of ideas, facts or circumstances within which the tests will be
conducted
– Scope
• The domain or extent of the test activities
– Details of resource needed
– Effort required
– Schedule of activities
– Budget
• Test objectives are identified from different sources
• Each test case is designed as a combination of modular test
components called test steps
• Test steps are combined together to create more complex tests
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
24 © Naik & Tripathy
Monitoring and Measuring Test Execution
• Metrics for monitoring test execution
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
25 © Naik & Tripathy
Test Tools and Automation
• Increased productivity of the testers The test cases to be automated are well
defined
• Better coverage of regression testing
Test tools and an infrastructure are in
place
• Reduced durations of the testing
phases
The test automation professionals have
prior successful experience in
• Reduced cost of software maintenance automation
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
26 © Naik & Tripathy
Test Team Organization and Management
Software Testing and QA Theory and Practice (Chapter 1: Basic Concepts and Preliminaries)
27 © Naik & Tripathy