Testing Concepts ClassBook Lesson01
Testing Concepts ClassBook Lesson01
Test Process
o Test Process in Context
o Test Activities and Tasks
o Test Work Products
o Traceability between the Test Basis and Test Work Products
Examples :
To validate whether the test object is complete and works as the users
and other stakeholders expect
To build confidence in the level of quality of the test object
To prevent defects
In some cases, testers are responsible for the initial test and the final
confirmation test, while developers do the debugging and associated
component testing.
Use of appropriate test techniques applied with the appropriate level of test
expertise, in the appropriate test levels, and at the appropriate points in the SDLC
can reduce the frequency of problematic deliveries.
Examples :
Testers working closely with system designers reduces the risk of fundamental
design defects.
Testers working closely with developers reduces the risk of defects within the
code and the tests.
Testers verifying and validating the software prior to release can detect failures
that increases the likelihood that the software meets stakeholder needs and
satisfies requirements.
Quality Assurance (QA) and Testing are not the same, but they are
related - Quality management, ties them together.
Entire team (designers, coders, testers, etc.) is Only tester is responsible for QC.
responsible for QA.
Examples : use of CASE (engineering) and CAST Examples: Walkthrough, inspections, etc.
(testing) tools, training and quality audits.
1.2.3 Errors, Defects and Failures
A person can make an error (mistake), which can lead to the introduction of a
defect (fault or bug) in the software code or in some other related work
product.
An error that leads to the introduction of a defect in one work product can
trigger an error that leads to the introduction of a defect in a related work
product.
Example :
A requirements elicitation error can lead to a requirements defect, which then
results in a programming error that leads to a defect in the code. If a defect in
the code is executed, this may cause a failure, but not necessarily in all
circumstances. For example, some defects require very specific inputs or
preconditions to trigger a failure, which may occur rarely or never.
1.2.3 Errors, Defects and Failures (Cont.)
Time pressure
Human fallibility
Inexperienced or insufficiently skilled project participants
Miscommunication between project participants, including
miscommunication about requirements and design
Complexity of the code, design, architecture, the underlying problem to be
solved, and/or the technologies used
Misunderstandings about intra-system and inter-system interfaces,
especially when such intra-system and inter-system interactions are large
in number
New, unfamiliar technologies
Environmental conditions - for example, radiation, electromagnetic fields,
and pollution can cause defects in firmware or influence the execution of
software by changing hardware conditions.
1.2.4 Defects, Root Causes and Effects
The root causes of defects are the earliest actions or conditions that
contributed to creating the defects.
Defects can be analyzed to identify their root causes.
By focusing on most significant root causes, root cause analysis can lead to
process improvements that prevent future defects from being introduced.
Example :
Suppose incorrect interest payments, due to a single line of incorrect code,
results in customer complaints. The defective code was written for a user
story which was ambiguous, due to the product owner’s misunderstanding
of how to calculate interest. Therefore, it means that :
o customer complaints – effects
o incorrect interest payments – failures
o improper calculation in the code – defect
o lack of knowledge on the part of the product owner - root cause of this defect
o Due to lack of knowledge, Product owner makes a mistake while writing user story.
Cost of Software Defects
It is Easy to find and fix defect in early stages rather than in the later
phases of software.
Importance of Testing Early in SDLC Phases
Testers become more familiar with the software, as they are more
involved with the evolution of the product.
Reduces the chances of failure
Economics of Testing
It is both the driving force and the limiting factor
Driving - Earlier the errors are discovered and removed in the lifecycle,
lowers the cost of their removal.
Limiting - Testing must end when the economic returns cease to make it
worth while i.e. the costs of testing process significantly outweigh the
returns
Scope of Software Testing
Test critical
quality risks
Areas
Over
under
Test
test
No. of
defects
Factors influencing the Scope of Testing
Contractual requirements
Legal requirements
Privacy related laws
Non-disclosure of identity
Industry-specific requirements
Aircraft safety equipment
Scope of Testing is about identifying the correct test cases for automation
The steps involved are:
Identify various factors that form the basis of identifying the candidate test cases
Apply ‘Divide & rule’ strategy : Break the application into smaller modules
Analyze each module to identify the candidate test cases
Calculate ROI
Factors influencing the scope of testing :
In small projects
Test case writing
Test case execution
Regression testing
In Large projects
Setting up test bed
Generating test data, test scripts, etc.
1.4 Test Process
The proper, specific software test process in any given situation depends on
many factors.
Few of the Contextual factors that influence the test process are :
SDLC model and project methodologies being used
Business domain
It is very useful if the test basis (for any level or type of testing that is being
The coverage criteria can act effectively as key performance indicators (KPIs)
Test planning
Test monitoring and control
Test analysis
Test design
Test implementation
Test execution
Test completion
Software testing life cycle
Test Test Test Defect Delivery
Strategy Development Execution Management
Automation UAT
Test Plans Defects Bug Tracking Installation
Strategy Test Scripts Test Reports Bug Fixing Testing
Test Schedule Test Design Test Metrics Bug Verification Requirements
Resource Planning Test Data Verification
TS TD TE DM D
Test Planning
1. Analyzing the test basis appropriate to the test level being considered.
Requirement specifications, such as business requirements, functional requirements,
system requirements, user stories, epics, use cases, or similar work products that
specify desired functional and non-functional component or system behavior
Risk analysis reports, which may consider functional, non-functional, and structural
aspects of the component or system
Test Analysis (Cont.)
2. Evaluating the test basis and test items to identify defects of various
types, such as:
Ambiguities
Omissions
Inconsistencies
Inaccuracies
Contradictions
Superfluous statements
Test Analysis (Cont.)
During test design, the test conditions are elaborated into high-level test
cases, sets of high-level test cases, and other testware. So, test analysis
answers the question “what to test?” while test design answers the
question “how to test?”
Test design includes the following major activities:
Designing and prioritizing test cases and sets of test cases
Identifying necessary test data to support test conditions and test cases
Designing the test environment and identifying any required
infrastructure and tools
Capturing bi-directional traceability between the test basis, test
conditions, test cases, and test procedures (see section 1.4.4)
The elaboration of test conditions into test cases and sets of test cases
during test design often involves using test techniques (see chapter 4).
Test Implementation
Creating test suites from the test procedures and automated test scripts
Arranging the test suites within a test execution schedule in a way that
results in efficient test execution (see section 5.2.4)
Preparing test data and ensuring it is properly loaded in the test environment
Verifying and updating bi-directional traceability between the test basis, test
conditions, test cases, test procedures, and test suites (see section 1.4.4)
Test Execution
During test execution, test suites are run in accordance with the test
execution schedule.
Test execution includes the following major activities:
Recording the IDs and versions of the test item(s) or test object, test
tool(s), and testware
Executing tests either manually or by using test execution tools
Comparing actual results with expected results
Analyzing anomalies to establish their likely causes (e.g., failures may
occur due to defects in the code, but false positives also may occur
(see section 1.2.3))
Reporting defects based on the failures observed (see section 5.6)
Logging the outcome of test execution (e.g., pass, fail, blocked)
Repeating test activities either as a result of action taken for an
anomaly, or as part of the planned testing (e.g., confirmation testing,
or regression testing)
Verifying and updating bi-directional traceability between the test
basis, test conditions, test cases, test procedures, and test results.
Test Completion
Finalizing and archiving the test environment, the test data, the test
infrastructure, and other testware for later reuse
Handing over the testware to the maintenance teams, other project
teams, and/or other stakeholders who could benefit from its use
Analyzing lessons learned from the completed test activities to
determine changes needed for future iterations, releases, and projects
Using the information gathered to improve test process maturity.
1.4.3 Test Work Products
Test work products are created as part of the test process. Many of the test
work products can be captured and managed using test management tools
and defect management tools (see chapter 6).
Test planning work products
Test monitoring and control work products
Test analysis work products
Test design work products
Test implementation work products
Test execution work products
Test completion work products
1.4.4 Traceability between Test Basis and Test Work
Products
It is important to establish and maintain traceability throughout the test process
between each element of the test basis and the various test work products associated
with it.
Improving the understandability of test progress reports and test summary reports
to include the status of elements of the test basis (e.g., requirements that passed
their tests, requirements that failed their tests, and requirements that have
pending tests)
Relating the technical aspects of testing to stakeholders in terms that they can
understand
Testers and test managers need to have good interpersonal skills to be able to
communicate effectively about defects, failures, test results, test progress,
and risks, and to build positive relationships with colleagues.
Ways to communicate well include the following examples:
Start with collaboration rather than battles. Remind everyone of the common
goal of better quality systems.
Emphasize on the benefits of testing. For example, for the authors, defect
information can help them improve their work products and their skills. For
the organization, defects found and fixed during testing will save time and
money and reduce overall risk to product quality.
Confirm that the other person has understood what has been said and vice
versa.
Developers and testers often think differently. Bringing these mindsets together
helps to achieve a higher level of product quality.
A tester’s mindset tends to grow and mature as the tester gains experience.
In addition, confirmation bias makes it difficult to find mistakes in their own work.
With the right mindset, developers are able to test their own code.
Having some of the test activities done by independent testers increases defect
detection effectiveness, which is particularly important for large, complex, or safety-
Limitations of Software Testing
Even if we could generate the input, run the tests, and evaluate the output,
we would not detect all faults
Correctness is not checked
The programmer may have misinterpreted the specs, the specs may have
misinterpreted the requirements
There is no way to find missing paths due to coding errors
Summary
Question 5: One can find missing paths due to coding errors (T/F)