0% found this document useful (0 votes)
22 views31 pages

08 Software Testing and Validation

Testing and validation

Uploaded by

iamegyimah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views31 pages

08 Software Testing and Validation

Testing and validation

Uploaded by

iamegyimah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

1

DR. (MRS) T-S.M.A. ADJAIDOO



08
SoftwareTesting
COE 356: Introduction to Software Engineering

and Validation
2


Today’s Lesson

Introduction to Basic Types of Challenges in Best Practices


Testing Validation and
Software Concepts & Software Software in Software
Strategies Verification
Testing Terminologies Testing Testing Testing
COE 356: Introduction to Software Engineering
3


Introduction to Software Testing

Software Testing spans the activities involved in evaluating a


software program in order to detect differences between the
expected and actual product

Involves
using behaves as expected
tools to
verify meets specified requirements
COE 356: Introduction to Software Engineering

that the
software:
satisfies intended objectives
4


Introduction to Software Testing

▪ The aim of program testing is to help identify all defects in a


program to ensure quality, reliability and functionality before it is
deployed
▪ In practice, even after satisfactory completion of the testing
phase, it is not possible to guarantee that a program is 100%
COE 356: Introduction to Software Engineering

error free. WHY?


▪ Careful testing can expose a large percentage of the defect
leading to defect reduction
5


Basic Concepts & Terminologies

▪ Testing a program involves executing the program with a set of


test inputs and observing if the program behaves as expected.
▪ If the program fails to behave as expected, the input data and
the conditions under which it fails are noted for debugging and
error correction
COE 356: Introduction to Software Engineering

output
System
input

A simplified view of program testing


6


Terminologies

Defect generally refers to some problem with the software, either


with its external behaviour or with its internal characteristics.
The inability of a system or
The
IEEE Failure: component to perform its required
functions within specified
performance requirements.
Standard
An incorrect step, process, or data
610.12
defines Fault: definition in a computer program.
COE 356: Introduction to Software Engineering

the
A human action that produces an
following
terms: Error: incorrect result.
7


Terminologies

a behavioural deviation from the

Failure: user requirement or the product


specification

Cause an underlying condition within a

Fault: software that causes certain


failure(s) to occur

a missing or incorrect human

Error: action resulting in certain fault(s)


COE 356: Introduction to Software Engineering

being injected into a software

• Failures, faults, and errors are collectively referred to as defects


• Defects are commonly called ‘bugs’
8


Types of Software Testing

1 2 3 4
Manual vs. Non-
Functional Regression
COE 356: Introduction to Software Engineering

Automated functional
Testing Testing
Testing Testing
9


Manual vs. Automated Testing

Manual Testing
▪ Manual testing is a sort of testing where the test is carried out
without the use of any tools or automation.
▪ Testers create test cases for the codes, test the software, and
provide the product's final report.
COE 356: Introduction to Software Engineering

▪ It is particularly useful for exploratory testing, usability testing and


scenarios which require human judgement and intuition
10


Manual vs. Automated Testing
Manual Testing

Advantages Disadvantages

Human intuition can detect defects automations Time consuming for repetitive test cases and
may miss large-scale applications

Early testing can provide fast feedback Requires skilled testers in complex cases

Less expensive especially for small projects Prone to human errors


COE 356: Introduction to Software Engineering

Human testers can provide user experience Not possible to record and reuse manual test
feedback cases

Flexible as testers can easily modify and execute


Not scalable for large projects
test cases and provide real-time feedback
11


Manual vs. Automated Testing

Automated Testing
▪ Automated testing is a kind of testing done with the assistance of
tools (automation).
▪ Test scripts are created using automation tools. These scripts are
run automatically to compare actual results with expected results
COE 356: Introduction to Software Engineering

▪ It can be useful for scenarios requiring frequent test case running,


regression testing, performance testing, and more.
12


Manual vs. Automated Testing
Automated Testing

Advantages Disadvantages

Can be executed repeatedly with consistent Difficult to inspect elements that require
results human assessment like visuals

Can save costs in the long-run by reducing


High cost of automation and maintenance
manual effort and increasing productivity

Can be recorded allowing for reuse of tests Requires trained employees


COE 356: Introduction to Software Engineering

Executes much faster thus reducing overall


Possibilities of false positives/negatives
testing time

Reduced human error Initial setup time may be high


13


Manual vs. Automated Testing
Differences

Parameter Manual Testing Automated Testing


Execution Process Executed by human testers Executed automatically using automation
tools and test scripts

Initial Setup Less setup time because no automation Setup time is needed to develop scripts
tools are needed and select tools

Processing Time Time consuming because it relies on Executes tests much faster
human speed and efficiency

Testing Uses Exploratory testing, usability testing and Performance Testing, load testing, and
COE 356: Introduction to Software Engineering

scenarios that require human intuition scenarios requiring frequent execution

Resources Takes up human resources Takes up automation tools and trained


employees

Human Intervention Relies on human judgement and intuition Involves minimal human intervention
ones the scripts and tools are setup

Investment Directed towards human resource Directed towards tools and automated
engineers
14


Functional Testing

▪ This involves verifying the various functions of the software to


ensure that they perform accordingly as described in the
functional requirements and specifications
▪ The goal is to ensure that the software functions correctly as
COE 356: Introduction to Software Engineering

expected by the end-users


▪ It can be manual or automated
15


Functional Testing
Example

▪ How is this functionality


expected to behave?
▪ What inputs are required?
▪ Test the scenario
▪ What output does it give?
COE 356: Introduction to Software Engineering

▪ Does the actual output


correspond to the expected
output?
16


Functional Testing
Types of Functional Testing

Integration System Acceptance


Unit Testing
Testing Testing Testing

Client verifies
Combined Complete
that
Functionality individual integrated
developed
of individual components system is
system
units or are tested to tested to
COE 356: Introduction to Software Engineering

functions as
modules are ensure they ensure it
desired and
verified work together complies with
fulfils
as expected requirements
requirements
17


Non-functional Testing

▪ It focusses on testing the non-functional aspects of the software.


▪ Tests are related to quality and reliability. How the software
performs under various conditions

COE 356: Introduction to Software Engineering

It ensures that the software meets quality attributes such as


performance, usability, reliability, scalability and security
18


Non-functional Testing
Types of Non-functional Testing

Performance Usability Reliability


Testing Testing Testing

Stress Compatibility
Load Testing
Testing Testing
COE 356: Introduction to Software Engineering

Security Scalability
Testing Testing
19


Regression Testing

▪ It involves retesting the software to ensure that recent code


changes have not cause adverse effects in existing features.
▪ The goal is to ensure stability and reliability by detecting
unintended defects introduced during code modifications or
updates
COE 356: Introduction to Software Engineering

▪ It is typically performed after bug fixes and targets parts of the


software that are likely to be affected by recent changes
20


Testing Strategies

1 • Black Box Testing

2 • White Box Testing


COE 356: Introduction to Software Engineering

3 • Grey Box Testing


21


Black Box Testing

▪ It is testing with the focus on the functionality of the software


without knowing about the internal code and structures.
▪ Focus is from an external perspective like how a user would
interact with it
COE 356: Introduction to Software Engineering

▪ Test cases are designed to validate inputs and verify outputs of


bout functional and non-functional requirements
22


Black Box Testing

Advantages Disadvantages

Allows testing from a user’s perspective Difficulty in locating defects

Test cases may not find certain issues such as


Tester does not require programming skills
structural errors
COE 356: Introduction to Software Engineering

Tests can be designed without programming


Some parts of the program may not be tested
skills or access to source code

Working with a large sample space of inputs


may be time consuming and exhausting
23


White Box Testing

Focuses on the testing the internal structure, code and inner


working of a software

Statement • Executed at least once

Path • All possible routes are executed

Branch • Every true/false outcome is tested


COE 356: Introduction to Software Engineering

Loops • Ensure they work efficiently

Output • Each one is as expected


24


White Box Testing

Advantages Disadvantages

Allows for thorough testing of


Requires programming expertise
internal structures

Helps to uncover hidden defects Can be time-consuming for large-


missed by black-box testing scale applications
COE 356: Introduction to Software Engineering

May not detect integration or


usability defects
25


Grey Box Testing

▪ Testers have partial access to


internal code
Black ▪ Tests are designed based on
Box
partial knowledge of internal
Grey structures

Box Combines input of developers
and testers
COE 356: Introduction to Software Engineering

White
Box ▪ Eg: Testing of databases,
APIs and integrated
components
26


Validation and Verification

Verification

• Ensuring that the product is built right

Validation
COE 356: Introduction to Software Engineering

• Ensuring that the right product is built


27


Verification Techniques

1 2 3

• Reviews • Walkthroughs • Inspection


• Systematic • Informal, • Formal
examination collaborative technical
of codes, demos with review for
COE 356: Introduction to Software Engineering

designs and stakeholders defect


requirements detection
28


Validation Techniques

1 2 3

• Testing • Prototyping • Simulations


COE 356: Introduction to Software Engineering
29


Challenges in Software Testing

1 2 3 4
Test
Time Changing Lack of
COE 356: Introduction to Software Engineering

Environment
Constraints Requirements Resources
setup
30


Best Practices in Software Testing

Strategies for effective testing

1 • Early Testing

2 • Continuous integration &Testing


COE 356: Introduction to Software Engineering

3 • Test Automation

4 • Clear documentation & reporting


31

Any Questions?

The End
Contact: [email protected]

Office: Caesar Building, Room 413


COE 356: Introduction to Software Engineering

You might also like