Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

The University of Lahore

A “W4” Category University

CS-4349 Software Testing & Implementation

18/03/2024 1
The University of Lahore
A “W4” Category University

1.1.5 Testing and quality

What is root-cause analysis?


To find real reason when we detect faults is called root
cause analysis.
When we detect failures, we might try to track them back to
their root cause, the real reason that they happened.

18/03/2024 2
The University of Lahore
A “W4” Category University

1.1.5 Testing and quality

Q-1 What are the ways of carrying root-cause


analysis?
1. Discussion
2. Involving group of people with brainstorming ideas

18/03/2024 3
The University of Lahore
A “W4” Category University

1.1.5 Testing and quality

Q-2
Suppose an organization has a problem with printing repeatedly
failing. Some IT maintenance will sit together to examine the
problem and they start by brainstorming all the possible causes
of the failure.
Some of the cause they discover might be:
1. Printer runs out of supplies (ink or paper)
2. Printer driver software fails.
3. Printer room is too hot for the printer.

18/03/2024 4
The University of Lahore
A “W4” Category University

1.1.5 Testing and quality

Q-3
If we look at one of the causes “ printer runs out of
supplies, it may happen because:
ROOT CAUSE:
1. No one is responsible for checking printer ink/paper before use.
2. Staff not trained in looking after the printer.
3. No process for stock control and ordering.

18/03/2024 5
The University of Lahore
A “W4” Category University

1.1.5 Testing and quality

Summary
Root-cause analysis is an important aspect of
quality assurance activities and testing
contributes by helping us to identify defect and
improve software quality as early as possible
before the software is in use.

18/03/2024 6
The University of Lahore
A “W” Category University
Ranked Amongst The Top 550 Universities of The WORLD!
1.1.6 How much testing is enough?

How much testing should we do?

Test everything Test nothing Test some of the software

Exhaustive Testing
A test approach in which the test suit comprises all combinations
of input values and preconditions.
Testing Principle-Exhaustive testing is impossible
Testing everything is not feasible/possible.
18/03/2024 7
The University of Lahore
A “W” Category University
Ranked Amongst The Top 550 Universities of The WORLD!
1.1.6 How much testing is enough?

EXAMPLE 1
How many tests would you need to do to completely
test a one-digit numeric field?
1. 10 possible valid numeric values (10 tests)
2. We need to ensure that all invalid values are rejected.
e.g. 26 uppercase letters, 26 lowercase letters, special
characters and blank space. Total tests would be 68.

18/03/2024 8
The University of Lahore
A “W” Category University
Ranked Amongst The Top 550 Universities of The WORLD!
1.1.6 How much testing is enough?

EXAMPLE 2
One screen has 15 input fields, each having 1
digit numeric field. How many test are required
to do?

18/03/2024 9
The University of Lahore
A “W4” Category University

1.2 What is testing?

TESTING
“Testing is a process rather than a single
activity-there are series of activities
involved.”
One of the activities is all life cycle activities. Testing may
takes place throughout the software development life
cycle.

18/03/2024 10
The University of Lahore
A “W4” Category University

1.2 What is testing?

Software Development Life Cycle

18/03/2024 11
The University of Lahore
A “W4” Category University

1.2 What is testing?

Software Development Life Cycle (SDLC)

18/03/2024 12
The University of Lahore
A “W4” Category University

1.2 What is testing?

SYSTEM LIFE CYCLE

1. System life cycle is an organizational process of developing


and maintaining systems.
2. It helps in establishing a system project plan.
3. System development life cycle means combination of various
activities put together are referred as system development
life cycle.
4. In the System Analysis and Design terminology, the system
development life cycle means software development life
cycle.

18/03/2024 13
The University of Lahore
A “W4” Category University

1.2 What is testing?

Phases of software development cycle

1. Problem Recognition (System Study)


2. Feasibility Study
3. System Analysis
4. System Design
5. Coding /Implementation/Construction
6. Testing
7. Maintenance

18/03/2024 14
The University of Lahore
A “W4” Category University

1.2 What is testing?


System Study
1. System study is the first stage of system development life
cycle.
2. It gives a clear picture of what actually the physical system is?
3. System study is done in two phases.
In the first phase, the preliminary survey of the system is
done which helps in identifying the scope of the system.
The second phase of the system study is more detailed
and in-depth study in which the identification of user’s
requirement and the limitations and problems of the
present system are studied.

18/03/2024 15
The University of Lahore
A “W4” Category University

1.2 What is testing?

4. After completing the system study, a system


proposal is prepared by the System Analyst (who
studies the system) and placed before the user.

5. The proposed system contains the findings of


the present system and recommendations to
overcome the limitations and problems of the
present system in the light of the user’s
requirements.

18/03/2024 16
The University of Lahore
A “W4” Category University

1.2 What is testing?

System Study (SUMMARY)

1. Problem identification and project initiation


2. Background analysis
3. Conclusion findings
4. Carry out the preliminary study of the situation
5. Decide exactly what the problem is?

18/03/2024 17
The University of Lahore
A “W4” Category University

1.2 What is testing?

Feasibility Study
On the basis of result of the initial study, feasibility study takes
place.
The feasibility study is basically the test of its
Workability
Meeting user’s requirements
Effective use of resources
Cost effectiveness
Decide whether or not to continue with the project?
In the process of feasibility study, the cost and benefits are
estimated with greater accuracy.

18/03/2024 18
The University of Lahore
A “W4” Category University

1.2 What is testing?

System Analysis
Study the existing system in detail is called analysis.
During analysis, data are collected

Ways to study the existing system


1. Interview users of the current system
2. Read any manual or instructions which are in use
3. Observe the current system in operation
4. Questionnaires

18/03/2024 19
The University of Lahore
A “W4” Category University

1.2 What is testing?

System Design
Based on the user requirements and the detailed analysis of
a new system, the new system must be designed. This is the
phase of system designing.
It is a most difficult phase in the development of a system.

Normally, the design proceeds in two stages :


1. preliminary or general design
2. Structure or detailed design

18/03/2024 20
The University of Lahore
A “W4” Category University

1.2 What is testing?


Preliminary or general design:
1. The features of the new system are specified.
2. The costs of implementing these features and the benefits
to be derived are estimated.
Structure or detailed design:
1. At this stage, the design of the system becomes more
structured.
2. Input, output and processing specifications are drawn up
in detail.
3. In the design stage, the programming language and the
platform in which the new system will run are also
decided.
18/03/2024 21
The University of Lahore
A “W4” Category University

1.2 What is testing?

Designing
1. Data capture forms
2. Type of user interface
3. Validations methods-how is input data going to be test?
4. Programs-if some new programs has to be written then they have to be
designed at this stage
5. Input screens
6. Output screens
7. System flowcharts
8. Program flowcharts

18/03/2024 22
The University of Lahore
A “W4” Category University

Coding/Construction
1. After designing the new system, the whole system is
required to be converted into computer understanding
language.
2. This is also called the programming phase in which the
programmer converts the program specifications into
computer instructions, which we refer as programs. The
programs coordinate the data movements and control the
entire process in a system.
3. User documentation is prepared
4. Technical documentation is prepared

18/03/2024 23
The University of Lahore
A “W4” Category University

Testing
1. Before actually implementing the new system into
operations, a test run of the system is done removing all
the bugs, if any.
2. It is an important phase of a successful system.
3. After codifying the whole programs of the system, a test
plan should be developed and run on a given set of test
data.
4. The output of the test run should match the expected
results.

18/03/2024 24
The University of Lahore
A “W4” Category University

Testing
1. Unit Testing
2. Integration Testing
3. System testing. Test data is designed and the results are forecast
4. Acceptance testing. The users of the new system check it

18/03/2024 25
The University of Lahore
A “W4” Category University

Component Testing
Searches for defects and verifies the functioning of software components
(modules, programs, objects, classes etc) that are separately testable.
Integration Testing
Tests interfaces between components, interactions to different parts of a
system such as OS, file system and hardware.
System Testing
Concerned with the behavior of the whole system/product.
Acceptance Testing
Validation testing with respect to user needs, requirements and expectations.

18/03/2024 26
The University of Lahore
A “W4” Category University

Implementation
1. After having the user acceptance of the new system
developed, the implementation phase begins.
2. Implementation is the stage of a project during which theory
is turned into practice.
3. During this phase, all the programs of the system are loaded
onto the user's computer. After loading the system, training of
the users starts.
4. File conversion
5. Software and hardware installation
6. System conversion

18/03/2024 27
The University of Lahore
A “W4” Category University

Implementation
Main topics of such type of training are:

1. How to execute the package


2. How to enter the data
3. How to process the data (processing details)
4. How to take out the reports

18/03/2024 28
The University of Lahore
A “W4” Category University

After the users are trained about the computerized system, manual
working has to shift from manual to computerized working. The
following two strategies are followed for running the system:

Direct Change Over: The old/existing system is immediately


removed and the new system come into place
Parallel Run:
In such run for a certain defined period, both the systems i.e.
computerized and manual are executed in parallel. This strategy is
helpful because of the following:
1. Manual results can be compared with the results of the
computerized system.
2. Failure of the computerized system at the early stage, does
not affect the working of the organization, because the
manual system continues to work, as it used to do.

18/03/2024 29
The University of Lahore
A “W4” Category University

Phased/Pilot Run:
In this type of run, the new system is installed in parts.
Some part of the new system is installed first and
executed successfully for considerable time period.
When the results are found satisfactory then only other
parts are implemented. This strategy builds the
confidence and the errors are traced easily.

18/03/2024 30
The University of Lahore
A “W4” Category University

Maintenance
1. Maintenance is necessary to eliminate errors in the
system during its working life and to tune the system
to any variations in its working environment.
2. It has been seen that there are always some errors
found in the system that must be noted and
corrected. It also means the review of the system
from time to time.

18/03/2024 31
The University of Lahore
A “W4” Category University

System Maintenance and Review


The review of the system is done for:
1. Knowing the full capabilities of the system
2. Knowing/upgrade the required changes or the
additional requirements
3. Studying the performance
4. Keep watching on the new system
5. Repair faults in both hardware and software

18/03/2024 32
The University of Lahore
A “W4” Category University

What is Testing?

What is Software Testing?

18/03/2024 33
The University of Lahore
A “W4” Category University

What is Testing?
What is Software Testing?

The process of detecting defects is called testing.


The process concerned with planning, preparation and evaluation of software
products to determine that they satisfy specified requirements.

The process consisting of all life cycle activities, both static and dynamic,
concerned with planning, preparation and evaluation of software products
and related work products to determine that they satisfy specified
requirements, to demonstrate that they are fit for purpose and to detect
defects.

18/03/2024 34
The University of Lahore
A “W4” Category University

What is Testing?

Software Testing
The process consisting of all life cycle activities, both
static and dynamic, concerned with planning,
preparation and evaluation of software products and
related work products to determine that they satisfy
specified requirements, to demonstrate that they are fit
for purpose and to detect defects.

18/03/2024 35
The University of Lahore
A “W4” Category University

What is Testing?

Dynamic
Executing the software code to demonstrate the
results (Chapter 4)

Static
Without executing software code to find defects.
Reviewing of documents including source code.
(Chapter 3)

18/03/2024 36
The University of Lahore
A “W4” Category University

What is Testing?
Planning
What we want to do? Report on testing progress, status of the software under test,
finalize and close testing when a phase completes. (Chapter 5)

Preparation
We need to choose what testing we’ll do? (Chapter 4)

Evaluation
Executing the test, we must check the results, evaluate the software and
completion criteria

Software products and related work products


We test the requirements and design specifications.
18/03/2024 37
The University of Lahore
A “W4” Category University

What is Testing?

Determine that software products satisfy requirements


Checking products against the requirements.

Demonstrate software products fit for purpose


Software does enough to help the users to carry out their tasks.
Software does what the user might expected.

Detect Defects
Finding and fixing defects

18/03/2024 38
The University of Lahore
A “W4” Category University

Software Test and Driving Test Compared

18/03/2024 39
The University of Lahore
A “W4” Category University

Software Test and Driving Test Compared

Activities Driving Test Software Test


1-Checking testing progress
1-Which routes to be followed?
2-Status of the software under test
Planning and 2-Time duration
Preparation 3-Finalize testing when phase
3-Questions to be asked
completes
4-What testing we will do?

Static and 1-Questions to the driver 1-Review the software


Dynamic 2-Driving the car 2-Executing the software

1-Questions 1-Check the results


Evaluation 2-Written test 2-Evaluate the software
3-Observation during driving 3-Completion criteria

18/03/2024 40
The University of Lahore
A “W4” Category University

Software Test and Driving Test Compared


Activities Driving Test Software Test
Determine 1-Checking patience
that they 2-Checking confidence 1-Review the code to check design
satisfy 3-Checking following the rules 2-Review the design to check
specified 4-Checking staring, clutch, gears specifications
requirements are properly used by the driver
Demonstrate
that they are 1-Driver is able to drive 1-Software is fit for purpose
fit for purpose

1-Finding faults of driver 1-Finding faults or defects


Detect defects
2-Suggest improvements 2-Fixing defects

18/03/2024 41
The University of Lahore
A “W4” Category University

When we can meet our test objectives?


Testing Principle-Early Testing
Testing activities should start as early as possible in the
software development and should be focused on defined
objectives.

18/03/2024 42
The University of Lahore
A “W4” Category University

Focusing on defects can help us plan our tests


Testing Principle- Defect Clustering
A small number of modules contain most of the defects discovered
during testing.
Reasons of defect clustering
1-Code is complex
2-Code is tricky
3-Not reviewing properly during development
4-Early testing is not implemented on time
18/03/2024 43
The University of Lahore
A “W4” Category University

When we can meet our test objectives?


Testing Activities
1. Acceptance testing
2. Alpha testing
3. Beta testing or field testing
4. Component or unit or module
5. Integration testing
6. Regression testing

18/03/2024 44
The University of Lahore
A “W4” Category University

Solution to minimize clustering


1. Reviewing every module to find defects and failures
2. Early testing should be implemented on time
3. Root-cause analysis to prevent defects and failures
happening again and again

18/03/2024 45
The University of Lahore
A “W4” Category University

The defect clusters change over time

Find more defects


as the testing
improves and then
as the defect
prevention kicks
in, defects
numbers dropping

18/03/2024 46
The University of Lahore
A “W4” Category University

Debugging removes defects


Debugging
The process of finding, analyzing and removing causes of
failures in the software is called debugging.

18/03/2024 47
The University of Lahore
A “W4” Category University

Debugging Removes Defects


Testing Principle-Pesticide Paradox
If the same tests are repeated over and over again,
eventually the same set of tests cases will no longer find
any new bugs. To overcome this “Pesticide Paradox”,
the test cases need to be regularly reviewed and revised,
and new and different tests need to be written to exercise
different parts of the software to find more defects.

18/03/2024 48
The University of Lahore
A “W4” Category University

Is the software defects free?


Testing Principle- Testing shows presence of
defects
Testing can show that defects are present, but can
not prove that there are no defects. Testing reduces
the probability of undiscovered defects. If no
defects are found, it is not a proof of correctness.

18/03/2024 49
The University of Lahore
A “W4” Category University

If we don’t find defects does that mean the user


will accept the software?

Testing Principle- Absence of errors fallacy


Finding and fixing defects does not help if the system built
is unusable and does not fulfill the user’s needs and
expectations.

18/03/2024 50
The University of Lahore
A “W4” Category University

Testing Principles-SUMMARY
1- Testing shows presence of defects
2- Exhaustive testing is impossible
3- Early testing
4- Defect clustering
5- Pesticide Paradox
6- Testing is context dependent
7- Absence-of-error fallacy
18/03/2024 51
The University of Lahore
A “W4” Category University

The Psychology of Testing

Independent testing- Who is a tester?


Independence
Separation of responsibilities, which encourages the
accomplishment of objective testing.
Level of Independence
Tests by the person who wrote the item under test
Tests by another person within the same team such as
another programmer
Tests by a person from a different
organizational group

18/03/2024 52
The University of Lahore
A “W4” Category University

The Psychology of Testing


Reviewing and testing Principles
1. Communicate findings on the product in a neutral, fact-focused
way without criticizing the person who created it.
2. Don’t blame
3. Be constructive
4. Say what you liked and what worked, as well as what didn’t
work
5. Don’t be pessimistic (emphasizing the bad part of the situation)

18/03/2024 53
The University of Lahore
A “W4” Category University

The Psychology of Testing


Reviewing and testing Principles
6. Show what risks have been uncovered and the benefits
of review and test
7. Be polite and helpful, collaborate with your colleagues
8. Try to understand how the other person feels
9. Confirm that the other person has understood what
you have said and vice versa
10. Offer you work to be reviewed

18/03/2024 54
The University of Lahore
A “W4” Category University

QUIZ 1 Chapter 1
Fundamental of Software Testing

18/03/2024 55

You might also like