ST-L01-Testing Fundamentals
ST-L01-Testing Fundamentals
ST-L01-Testing Fundamentals
Testing Fundamentals
© 2016
Lecture Learning Objectives
Objective
▪ Provides an overview about software testing and its
importance in software development.
Outcomes
▪ Understand what software testing is and why it is
important
3
01 | Testing Fundamentals
1.1. Definition, primary
objectives, and importance
of software testing
Section Overview
In this section, we will review the following:
▪ Definition, role, and objectives of software testing
▪ Testing everything is impossible
▪ Importance of software testing
5
Guiding Questions
6
What is Software Testing?
At its core, testing is the process of comparing
"what is" with "what ought to be”
9
The Impossibility of Testing Everything
Consider the following program:
int blech (int j) {
j = j - 1; // should be j = j + 1
j = j / 30000;
return j;
}
10
The Impossibility of Testing Everything
Consider the following input values and their ability to
detect this defect.
Input (j) Expected Actual
int blech (int j) { Result Result
j = j - 1; //should be j = j + 1 1 0 0
j = j / 30000; 42 0 0
return j;
40000 1 1
}
-64000 -2 -2
12
Why is Software Testing Important?
Source: http://www.guru99.com/software-testing-introduction-importance.html
13
Section Questions
16
Guiding Questions
What is the difference between
▪ errors, faults (defects) and failures?
▪ test case and test suite?
▪ verification and validation?
▪ QC and QA
17
Errors, Faults (Defects) and Failures
18
Test Case and Test Suite
19
Verification and Validation
Verification is the process of evaluating a software system
or component to determine whether the products of a given
development phase satisfy the conditions imposed at the
start of that phase.
Verification answers for the following question: ”Are we
building the product right?”
20
Quality Control vs. Quality Assurance
Criteria Software Quality Assurance Software Quality Control
(SQA/QA) (SQC/QC)
Definition SQA is a set of activities for ensuring SQC is a set of activities for
quality in software engineering ensuring quality in software
processes (that ultimately result in products. The activities focus
quality in software products). The on identifying defects in the
activities establish and evaluate the actual products produced.
processes that produce products.
Focus Process focused Product focused
Orientation Prevention oriented Detection oriented
Breadth Organization wide Product/project specific
Scope Relates to all products that will ever Relates to specific product
be created by a process
Activities Process Definition & Implementation, Reviews, Testing
Audits, Training
Table 1. The differences between QC and QA
21
Testing vs. Debugging – 1
At its core, testing is a process of finding "unknown"
faults (defects) whereas debugging is a process of
removing "known" faults (defects).
22
Testing vs. Debugging – 2
Debugging, or fault localization is the process of
1. locating the fault or defect
2. repairing the code
3. retesting the code
23
Quality Attributes
Quality Attributes are characteristics that reflect quality
of a system, system component, or process.
26
Quality Must Be Built In
Testing is concerned with what is in the product or
system and what is missing.
27
Section Questions
What is the difference between
• errors, faults (defects) and failures?
• test suite, test oracle and test bed?
• verification and validation?
• QC and QA
30
Guiding Questions
31
The Skills of Testing Professionals
The best software testers must have advanced
skills drawn from many software professions
including:
▪ Software developers
▪ Database developers
▪ Network developers
▪ System administrator
32
Why testers should know programming
33
The Main Role of Software Testers
The software testers’ main role is that of a verifier.
They should:
▪ Take an objective look at the software in progress that is
independent of the authors of development documents and of
program code.
34
What Else Does a Software Tester Do?
The professional answer is plan, plan, and plan.
35
Who Is on the Test Team?
A good test team has a mix of skill levels (entry,
intermediate, advanced) represented by its
members.
This enables:
▪ The more experienced testers to be responsible for the test
planning, scheduling, and analysis of test results.
39
7 Principles of Software Testing
No Principle Description
1 Testing shows the • Testing shows that defects are present but
presence of defects does not prove that there are no more
defects.
2 Exhaustive testing • Testing all the combinations of inputs and
is impossible preconditions is not feasible except for trivial
cases.
3 Early testing • Testing should begin as early as possible in
SDLC.
4 Defect clustering • Testing effort should be focused on the areas
where defects are expected and modules
with higher defect density.
40
7 Principles of Software Testing
No Principle Description
5 Pesticide paradox • Repeatedly running the same tests (test
cases) will reduce the probability of finding
new defects
6 Testing is context • Testing should be done differently for
dependent different contexts.
41
Summary
Testing is a concurrent lifecycle process of engineering, using, and
maintaining testware in order to measure and improve the quality of the
software being tested. (Craig and Jaskiel)
Recalling the objectives of testing, we must design tests that have the
highest likelihood of finding the most errors with a minimum amount of
time and effort. (Pressman)
43
References
1. Lee Copeland, A Practitioner's Guide to Software Test Design,
Artech House, 2004: Chapter 1
5. http://www.guru99.com/software-testing-introduction-
importance.html
7. http://softwaretestingfundamentals.com/software-testing-basics/
44
Questions & Answers
45