SlideShare a Scribd company logo
Lecture 11
Software Testing
1
Lecture 11 Software Testing
Program Testing
Testing is intended to show that a program does
what it is intended to do and to discover program
defects before it is put into use. When you test
software, you execute a program using artificial
data.
You check the results of the test run for errors,
anomalies or information about the program’s non-
functional attributes.
Testing is part of a more general verification and
validation process, which also includes static
validation techniques. It can reveal the presence of
errors NOT their absence.
Lecture 11 Software Testing 2
Program Testing Goals
 To demonstrate to the developer and the customer that
the software meets its requirements.
 For custom software, this means that there should be at least
one test for every requirement in the requirements document.
For generic software products, it means that there should be
tests for all of the system features, plus combinations of these
features, that will be incorporated in the product release.
 To discover situations in which the behavior of the
software is incorrect, undesirable or does not conform to
its specification.
 Defect testing is concerned with rooting out undesirable system
behavior such as system crashes, unwanted interactions with
other systems, incorrect computations and data corruption.
3
Lecture 11 Software Testing
Validation and Defect Testing
The first goal leads to validation testing
 You expect the system to perform correctly using a
given set of test cases that reflect the system’s
expected use.
The second goal leads to defect testing
 The test cases are designed to expose defects. The
test cases in defect testing can be deliberately
obscure and need not reflect how the system is
normally used.
4
Lecture 11 Software Testing
Testing Process Goals
Validation Testing
 To demonstrate to the developer and the system
customer that the software meets its requirements
 A successful test shows that the system operates as
intended.
Defect Testing
 To discover faults or defects in the software where its
behavior is incorrect or not in conformance with its
specification
 A successful test is a test that makes the system
perform incorrectly and so exposes a defect in the
system.
5
Lecture 11 Software Testing
An input-output model of program testing
6
Lecture 11 Software Testing
Verification:
"Are we building the product right”.
 The software should conform to its specification.
Validation:
"Are we building the right product”.
 The software should do what the user really requires.
Verification vs Validation
7
Lecture 11 Software Testing
V & V Confidence
 Aim of V & V is to establish confidence that the system
is ‘fit for purpose’.
 Depends on system’s purpose, user expectations and
marketing environment
 Software purpose
• The level of confidence depends on how critical the software
is to an organisation.
 User expectations
• Users may have low expectations of certain kinds of
software.
 Marketing environment
• Getting a product to market early may be more important
than finding defects in the program.
8
Lecture 11 Software Testing
Software Inspections: concerned with analysis of
the static system representation to discover
problems (static verification)
 May be supplement by tool-based document and
code analysis.
Software Testing: concerned with exercising and
observing product behaviour (dynamic verification)
 The system is executed with test data and its
operational behaviour is observed.
Inspections and Testing
9
Lecture 11 Software Testing
Inspections and testing
10
Lecture 11 Software Testing
Software Inspections
 These involve people examining the source
representation with the aim of discovering anomalies
and defects.
 Inspections not require execution of a system so may
be used before implementation.
 They may be applied to any representation of the
system (requirements, design, configuration data, test
data, etc.).
 They have been shown to be an effective technique
for discovering program errors.
11
Lecture 11 Software Testing
A model of the software testing process
12
Lecture 11 Software Testing
Stages of Testing
Development Testing
 Where the system is tested during development to
discover bugs and defects.
Release Testing
 Where a separate testing team test a complete
version of the system before it is released to users.
User Testing
 Where users or potential users of a system test the
system in their own environment.
Lecture 11 Software Testing 13
Development Testing
 Development testing includes all testing activities that
are carried out by the team developing the system.
 Unit Testing: where individual program units or object
classes are tested. Unit testing should focus on testing
the functionality of objects or methods.
 Component Testing: where several individual units are
integrated to create composite components. Component
testing should focus on testing component interfaces.
 System Testing: where some or all of the components
in a system are integrated and the system is tested as a
whole. System testing should focus on testing
component interactions.
Lecture 11 Software Testing 14
Unit Testing
Unit testing is the process of testing individual
components in isolation.
It is a defect testing process.
Units may be:
 Individual functions or methods within an object
 Object classes with several attributes and methods
 Composite components with defined interfaces used
to access their functionality.
15
Lecture 11 Software Testing
Component Testing
 Software components are often composite components
that are made up of several interacting objects.
 For example, in the weather station system, the reconfiguration
component includes objects that deal with each aspect of the
reconfiguration.
 You access the functionality of these objects through the
defined component interface.
 Testing composite components should therefore focus
on showing that the component interface behaves
according to its specification.
 You can assume that unit tests on the individual objects within
the component have been completed.
Lecture 11 Software Testing 16
System Testing
System testing during development involves
integrating components to create a version of the
system and then testing the integrated system.
The focus in system testing is testing the
interactions between components.
System testing checks that components are
compatible, interact correctly and transfer the right
data at the right time across their interfaces.
System testing tests the emergent behaviour of a
system.
17
Lecture 11 Software Testing
System and Component Testing
During system testing, reusable components that
have been separately developed and off-the-shelf
systems may be integrated with newly developed
components. The complete system is then tested.
Components developed by different team members
or sub-teams may be integrated at this stage.
System testing is a collective rather than an
individual process.
 In some companies, system testing may involve a
separate testing team with no involvement from
designers and programmers.
Lecture 11 Software Testing 18
Use-case Testing
The use-cases developed to identify system
interactions can be used as a basis for system
testing.
Each use case usually involves several system
components so testing the use case forces these
interactions to occur.
The sequence diagrams associated with the use
case documents the components and interactions
that are being tested.
Lecture 11 Software Testing 19
Test-Driven Development (TDD)
 Test-driven development (TDD) is an approach to
program development in which you inter-leave testing
and code development. Tests are written before code
and ‘passing’ the tests is the critical driver of
development.
 You develop code incrementally, along with a test for
that increment. You don’t move on to the next
increment until the code that you have developed
passes its test.
 TDD was introduced as part of agile methods such as
Extreme Programming. However, it can also be used
in plan-driven development processes.
20
Lecture 11 Software Testing
Test-driven development
21
Lecture 11 Software Testing
Benefits of Test-driven Development
 Code coverage
 Every code segment that you write has at least one associated
test so all code written has at least one test.
 Regression testing
 A regression test suite is developed incrementally as a
program is developed.
 Simplified debugging
 When a test fails, it should be obvious where the problem lies.
The newly written code needs to be checked and modified.
 System documentation
 The tests themselves are a form of documentation that
describe what the code should be doing.
22
Lecture 11 Software Testing
Regression Testing
Regression testing is testing the system to check
that changes have not ‘broken’ previously
working code.
In a manual testing process, regression testing
is expensive but, with automated testing, it is
simple and straightforward.
All tests are rerun every time a change is made
to the program.
Tests must run ‘successfully’ before the change
is committed.
23
Lecture 11 Software Testing
Release Testing
 Release testing is the process of testing a particular
release of a system that is intended for use outside of
the development team.
 The primary goal of the release testing process is to
convince the supplier of the system that it is good
enough for use.
 Release testing, therefore, has to show that the system
delivers its specified functionality, performance and
dependability, and that it does not fail during normal use.
 Release testing is usually a black-box testing process
where tests are only derived from the system
specification.
24
Lecture 11 Software Testing
Performance Testing
Part of release testing may involve testing the
emergent properties of a system, such as
performance and reliability.
Tests should reflect the profile of use of the system.
Performance tests usually involve planning a series
of tests where the load is steadily increased until the
system performance becomes unacceptable.
Stress testing is a form of performance testing
where the system is deliberately overloaded to test
its failure behavior.
25
Lecture 11 Software Testing
User Testing
User or customer testing is a stage in the testing
process in which users or customers provide input
and advice on system testing.
User testing is essential, even when comprehensive
system and release testing have been carried out.
 The reason for this is that influences from the user’s
working environment have a major effect on the
reliability, performance, usability and robustness of a
system.
 These cannot be replicated in a testing environment.
26
Lecture 11 Software Testing
Types of User Testing
Alpha Testing
 Users of the software work with the development
team to test the software at the developer’s site.
Beta Testing
 A release of the software is made available to users
to allow them to experiment and to raise problems
that they discover with the system developers.
Acceptance Testing
 Customers test a system to decide whether or not it is
ready to be accepted from the system developers and
deployed in the customer environment. Primarily for
custom systems.
27
Lecture 11 Software Testing
Agile Methods and Acceptance Testing
In agile methods, the user/customer is part of the
development team and is responsible for making
decisions on the acceptability of the system.
Tests are defined by the user/customer and are
integrated with other tests in that they are run
automatically when changes are made.
There is no separate acceptance testing process.
Main problem here is whether or not the embedded
user is ‘typical’ and can represent the interests of all
system stakeholders.
28
Lecture 11 Software Testing
Any Questions??
29
Lecture 11 Software Testing
30
Lecture 11 Software Testing

More Related Content

Similar to Lecture 11 Software Engineering Testing Slide (20)

PPTX
Software testing
Aman Adhikari
 
PPTX
Software Testing adn Testing Software .pptx
ssuserb8b152
 
PPTX
Software Testing- Introduction Software.pptx
ssuserb8b152
 
PPTX
Software Testing
Sengu Msc
 
DOCX
Interview questions for manual testing technology.
Vinay Agnihotri
 
PDF
Ch7.Testing network chapter seven. .pdf
osama Alshoraihi
 
PPTX
Sftwre engg.testng
kanika20071990
 
PPTX
Different Software Testing Types and CMM Standard
Dhrumil Panchal
 
PPTX
black and white Box testing.pptx
PavanNikhil3
 
PPT
Innovative Approaches to Software Dev go the hell
ayeshakanwal75
 
PPTX
Software QA Fundamentals by Prabhath Darshana
Shamain Peiris
 
PPTX
Software testing
Sengu Msc
 
PPTX
Software testing
Sengu Msc
 
PPT
Object oriented sad 6
Bisrat Girma
 
DOC
software engineering
Subhanshu Mittal
 
PPTX
Ch8.Testing software enginnering 43.pptx
aamirali1061a
 
PDF
Ch8b_Testing.pdf - software testing course
OnyedikachiKanu2
 
PPT
Testing strategies in Software Engineering
MuhammadTalha436
 
PPTX
SDET UNIT 2.pptx
Dr. Pallawi Bulakh
 
DOCX
Unit 4 Software engineering deatiled notes.docx
aviral830351
 
Software testing
Aman Adhikari
 
Software Testing adn Testing Software .pptx
ssuserb8b152
 
Software Testing- Introduction Software.pptx
ssuserb8b152
 
Software Testing
Sengu Msc
 
Interview questions for manual testing technology.
Vinay Agnihotri
 
Ch7.Testing network chapter seven. .pdf
osama Alshoraihi
 
Sftwre engg.testng
kanika20071990
 
Different Software Testing Types and CMM Standard
Dhrumil Panchal
 
black and white Box testing.pptx
PavanNikhil3
 
Innovative Approaches to Software Dev go the hell
ayeshakanwal75
 
Software QA Fundamentals by Prabhath Darshana
Shamain Peiris
 
Software testing
Sengu Msc
 
Software testing
Sengu Msc
 
Object oriented sad 6
Bisrat Girma
 
software engineering
Subhanshu Mittal
 
Ch8.Testing software enginnering 43.pptx
aamirali1061a
 
Ch8b_Testing.pdf - software testing course
OnyedikachiKanu2
 
Testing strategies in Software Engineering
MuhammadTalha436
 
SDET UNIT 2.pptx
Dr. Pallawi Bulakh
 
Unit 4 Software engineering deatiled notes.docx
aviral830351
 

Recently uploaded (20)

PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PPTX
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PPTX
site survey architecture student B.arch.
sri02032006
 
PPTX
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
PDF
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
PPT
inherently safer design for engineering.ppt
DhavalShah616893
 
PPTX
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PDF
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
PPTX
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PPTX
Pharmaceuticals and fine chemicals.pptxx
jaypa242004
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PPTX
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
site survey architecture student B.arch.
sri02032006
 
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
inherently safer design for engineering.ppt
DhavalShah616893
 
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
Thermal runway and thermal stability.pptx
godow93766
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
Pharmaceuticals and fine chemicals.pptxx
jaypa242004
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
Ad

Lecture 11 Software Engineering Testing Slide

  • 2. Program Testing Testing is intended to show that a program does what it is intended to do and to discover program defects before it is put into use. When you test software, you execute a program using artificial data. You check the results of the test run for errors, anomalies or information about the program’s non- functional attributes. Testing is part of a more general verification and validation process, which also includes static validation techniques. It can reveal the presence of errors NOT their absence. Lecture 11 Software Testing 2
  • 3. Program Testing Goals  To demonstrate to the developer and the customer that the software meets its requirements.  For custom software, this means that there should be at least one test for every requirement in the requirements document. For generic software products, it means that there should be tests for all of the system features, plus combinations of these features, that will be incorporated in the product release.  To discover situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification.  Defect testing is concerned with rooting out undesirable system behavior such as system crashes, unwanted interactions with other systems, incorrect computations and data corruption. 3 Lecture 11 Software Testing
  • 4. Validation and Defect Testing The first goal leads to validation testing  You expect the system to perform correctly using a given set of test cases that reflect the system’s expected use. The second goal leads to defect testing  The test cases are designed to expose defects. The test cases in defect testing can be deliberately obscure and need not reflect how the system is normally used. 4 Lecture 11 Software Testing
  • 5. Testing Process Goals Validation Testing  To demonstrate to the developer and the system customer that the software meets its requirements  A successful test shows that the system operates as intended. Defect Testing  To discover faults or defects in the software where its behavior is incorrect or not in conformance with its specification  A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system. 5 Lecture 11 Software Testing
  • 6. An input-output model of program testing 6 Lecture 11 Software Testing
  • 7. Verification: "Are we building the product right”.  The software should conform to its specification. Validation: "Are we building the right product”.  The software should do what the user really requires. Verification vs Validation 7 Lecture 11 Software Testing
  • 8. V & V Confidence  Aim of V & V is to establish confidence that the system is ‘fit for purpose’.  Depends on system’s purpose, user expectations and marketing environment  Software purpose • The level of confidence depends on how critical the software is to an organisation.  User expectations • Users may have low expectations of certain kinds of software.  Marketing environment • Getting a product to market early may be more important than finding defects in the program. 8 Lecture 11 Software Testing
  • 9. Software Inspections: concerned with analysis of the static system representation to discover problems (static verification)  May be supplement by tool-based document and code analysis. Software Testing: concerned with exercising and observing product behaviour (dynamic verification)  The system is executed with test data and its operational behaviour is observed. Inspections and Testing 9 Lecture 11 Software Testing
  • 10. Inspections and testing 10 Lecture 11 Software Testing
  • 11. Software Inspections  These involve people examining the source representation with the aim of discovering anomalies and defects.  Inspections not require execution of a system so may be used before implementation.  They may be applied to any representation of the system (requirements, design, configuration data, test data, etc.).  They have been shown to be an effective technique for discovering program errors. 11 Lecture 11 Software Testing
  • 12. A model of the software testing process 12 Lecture 11 Software Testing
  • 13. Stages of Testing Development Testing  Where the system is tested during development to discover bugs and defects. Release Testing  Where a separate testing team test a complete version of the system before it is released to users. User Testing  Where users or potential users of a system test the system in their own environment. Lecture 11 Software Testing 13
  • 14. Development Testing  Development testing includes all testing activities that are carried out by the team developing the system.  Unit Testing: where individual program units or object classes are tested. Unit testing should focus on testing the functionality of objects or methods.  Component Testing: where several individual units are integrated to create composite components. Component testing should focus on testing component interfaces.  System Testing: where some or all of the components in a system are integrated and the system is tested as a whole. System testing should focus on testing component interactions. Lecture 11 Software Testing 14
  • 15. Unit Testing Unit testing is the process of testing individual components in isolation. It is a defect testing process. Units may be:  Individual functions or methods within an object  Object classes with several attributes and methods  Composite components with defined interfaces used to access their functionality. 15 Lecture 11 Software Testing
  • 16. Component Testing  Software components are often composite components that are made up of several interacting objects.  For example, in the weather station system, the reconfiguration component includes objects that deal with each aspect of the reconfiguration.  You access the functionality of these objects through the defined component interface.  Testing composite components should therefore focus on showing that the component interface behaves according to its specification.  You can assume that unit tests on the individual objects within the component have been completed. Lecture 11 Software Testing 16
  • 17. System Testing System testing during development involves integrating components to create a version of the system and then testing the integrated system. The focus in system testing is testing the interactions between components. System testing checks that components are compatible, interact correctly and transfer the right data at the right time across their interfaces. System testing tests the emergent behaviour of a system. 17 Lecture 11 Software Testing
  • 18. System and Component Testing During system testing, reusable components that have been separately developed and off-the-shelf systems may be integrated with newly developed components. The complete system is then tested. Components developed by different team members or sub-teams may be integrated at this stage. System testing is a collective rather than an individual process.  In some companies, system testing may involve a separate testing team with no involvement from designers and programmers. Lecture 11 Software Testing 18
  • 19. Use-case Testing The use-cases developed to identify system interactions can be used as a basis for system testing. Each use case usually involves several system components so testing the use case forces these interactions to occur. The sequence diagrams associated with the use case documents the components and interactions that are being tested. Lecture 11 Software Testing 19
  • 20. Test-Driven Development (TDD)  Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. Tests are written before code and ‘passing’ the tests is the critical driver of development.  You develop code incrementally, along with a test for that increment. You don’t move on to the next increment until the code that you have developed passes its test.  TDD was introduced as part of agile methods such as Extreme Programming. However, it can also be used in plan-driven development processes. 20 Lecture 11 Software Testing
  • 22. Benefits of Test-driven Development  Code coverage  Every code segment that you write has at least one associated test so all code written has at least one test.  Regression testing  A regression test suite is developed incrementally as a program is developed.  Simplified debugging  When a test fails, it should be obvious where the problem lies. The newly written code needs to be checked and modified.  System documentation  The tests themselves are a form of documentation that describe what the code should be doing. 22 Lecture 11 Software Testing
  • 23. Regression Testing Regression testing is testing the system to check that changes have not ‘broken’ previously working code. In a manual testing process, regression testing is expensive but, with automated testing, it is simple and straightforward. All tests are rerun every time a change is made to the program. Tests must run ‘successfully’ before the change is committed. 23 Lecture 11 Software Testing
  • 24. Release Testing  Release testing is the process of testing a particular release of a system that is intended for use outside of the development team.  The primary goal of the release testing process is to convince the supplier of the system that it is good enough for use.  Release testing, therefore, has to show that the system delivers its specified functionality, performance and dependability, and that it does not fail during normal use.  Release testing is usually a black-box testing process where tests are only derived from the system specification. 24 Lecture 11 Software Testing
  • 25. Performance Testing Part of release testing may involve testing the emergent properties of a system, such as performance and reliability. Tests should reflect the profile of use of the system. Performance tests usually involve planning a series of tests where the load is steadily increased until the system performance becomes unacceptable. Stress testing is a form of performance testing where the system is deliberately overloaded to test its failure behavior. 25 Lecture 11 Software Testing
  • 26. User Testing User or customer testing is a stage in the testing process in which users or customers provide input and advice on system testing. User testing is essential, even when comprehensive system and release testing have been carried out.  The reason for this is that influences from the user’s working environment have a major effect on the reliability, performance, usability and robustness of a system.  These cannot be replicated in a testing environment. 26 Lecture 11 Software Testing
  • 27. Types of User Testing Alpha Testing  Users of the software work with the development team to test the software at the developer’s site. Beta Testing  A release of the software is made available to users to allow them to experiment and to raise problems that they discover with the system developers. Acceptance Testing  Customers test a system to decide whether or not it is ready to be accepted from the system developers and deployed in the customer environment. Primarily for custom systems. 27 Lecture 11 Software Testing
  • 28. Agile Methods and Acceptance Testing In agile methods, the user/customer is part of the development team and is responsible for making decisions on the acceptability of the system. Tests are defined by the user/customer and are integrated with other tests in that they are run automatically when changes are made. There is no separate acceptance testing process. Main problem here is whether or not the embedded user is ‘typical’ and can represent the interests of all system stakeholders. 28 Lecture 11 Software Testing
  • 29. Any Questions?? 29 Lecture 11 Software Testing