SlideShare a Scribd company logo
1 of 32
Download to read offline
Software Testing
DR. K. ADISESHA
Software Engineering
Unit-5 Introduction
Software Testing
Development Testing
Test-Driven Development
User Testing
2
Software Testing
Dr. K. Adisesha
Introduction
Dr. K. Adisesha
3
Software 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 can reveal the presence of errors, but NOT their absence.
➢ Testing is part of a more general verification and validation process, which also
includes static validation techniques.
Software Testing
Dr. K. Adisesha
4
Goals of software testing:
To demonstrate to the developer and the customer that the software meets its
requirements.
➢ 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.
➢ A successful test shows that the system operates as intended.
➢ To discover situations in which the behavior of the software is incorrect, undesirable
or does not conform to its specification.
âť– Leads to defect testing: the test cases are designed to expose defects; the test cases
can be deliberately obscure and need not reflect how the system is normally used.
âť– A successful test is a test that makes the system perform incorrectly and so exposes
a defect in the system.
Introduction
Dr. K. Adisesha
5
Testing can be viewed as an input-output process:
Software Testing
Dr. K. Adisesha
6
Verification and validation:
Testing is part of a broader process of software verification and validation (V & V).
➢ 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.
➢ The Goal of V & V is to establish confidence that the system is good enough for its intended
use, which depends on:
âť– Software purpose: the level of confidence depends on how critical the software is to an
organization.
âť– 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.
Software Testing
Dr. K. Adisesha
7
Inspections and testing:
Software inspections 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.
➢ Inspections and testing are complementary and not opposing verification techniques.
Both should be used during the V & V process.
➢ Inspections cannot check non-functional characteristics such as performance,
usability, etc.
Software Testing
Dr. K. Adisesha
8
Inspections and testing:
Software inspections involve people examining the source representation with the aim
of discovering anomalies and defects.
➢ Inspections can check conformance with a specification but not conformance with the
customer's real requirements.
➢ Typically, a commercial software system has to go through three stages of testing:
âť– Development testing: the system is tested during development to discover bugs and
defects.
âť– Release testing: a separate testing team test a complete version of the system before it
is released to users.
âť– User testing: users or potential users of a system test the system in their own
environment.
Software Testing
Dr. K. Adisesha
9
Inspections and testing:
Software inspections involve people examining the source representation with the aim
of discovering anomalies and defects.
➢ Advantages of inspections include:
âť– During testing, errors can mask (hide) other errors. Because inspection is a static
process, you don't have to be concerned with interactions between errors.
âť– Incomplete versions of a system can be inspected without additional costs. If a
program is incomplete, then you need to develop specialized test harnesses to test the
parts that are available.
âť– As well as searching for program defects, an inspection can also consider broader
quality attributes of a program, such as compliance with standards, portability and
maintainability.
Software Testing
Dr. K. Adisesha
10
Development Testing:
Development testing includes all testing activities that are carried out by the team
developing the system:
➢ Unit testing: individual program units or object classes are tested; should focus on
testing the functionality of objects or methods.
➢ Component testing: several individual units are integrated to create composite
components; should focus on testing component interfaces.
➢ System testing: some or all of the components in a system are integrated and the
system is tested as a whole; should focus on testing component interactions.
Development Testing
Dr. K. Adisesha
11
Unit Testing:
Unit testing is the process of testing individual components in isolation. It is a defect
testing process.
➢ Unit testing should be automated so that tests are run and checked without manual
intervention. 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.
➢ When testing object classes, tests should be designed to provide coverage of all of the
features of the object:
âť– Test all operations associated with the object;
âť– Set and check the value of all attributes associated with the object;
âť– Put the object into all possible states, i.e. simulate all events that cause a state change.
Development Testing
Dr. K. Adisesha
12
Unit Testing:
Unit testing frameworks provide generic test classes that you extend to create specific
test cases.
➢ The objective of Unit Testing is:
âť– To isolate a section of code.
âť– To verify the correctness of the code.
âť– To test every function and procedure.
âť– To fix bugs early in the development cycle and to save costs.
âť– To help the developers understand the code base and enable
them to make changes quickly.
âť– To help with code reuse.
Development Testing
Dr. K. Adisesha
13
Unit Testing:
Unit testing frameworks provide generic test classes that you extend to create specific
test cases.
➢ In automated unit testing, you make use of a test automation framework (such as JUnit)
to write and run your program tests.
➢ An automated test has three parts:
âť– A setup part, where you initialize the system with the test case, namely the inputs and
expected outputs.
âť– A call part, where you call the object or method to be tested.
âť– An assertion part where you compare the result of the call with the expected result. If
the assertion evaluates to true, the test has been successful if false, then it has failed.
Development Testing
Dr. K. Adisesha
14
Unit Testing:
The test cases should show that, when used as expected, the component that you are
testing does what it is supposed to do.
➢ If there are defects in the component, these should be revealed by test cases.
➢ This leads to two types of unit test cases:
âť– The first of these should reflect normal operation of a program and should show that
the component works as expected.
âť– The other kind of test case should be based on testing experience of where common
problems arise. It should use abnormal inputs to check that these are properly
processed and do not crash the component.
Development Testing
Dr. K. Adisesha
15
Types of Unit Testing:
There are 2 types of Unit Testing: Manual, and Automated.
➢ There are 3 types of Unit Testing Techniques. They are
âť– Black Box Testing: This testing technique is used in covering the unit tests for input, user
interface, and output parts.
âť– White Box Testing: This technique is used in testing the functional behavior of the system by
giving the input and checking the functionality output including the internal design structure
and code of the modules.
âť– Gray Box Testing: This technique is used in executing the relevant test cases, test methods, and
test functions, and analyzing the code performance for the modules.
Development Testing
Dr. K. Adisesha
16
Component Testing:
Software components are often composite components that are made up of several
interacting objects. Testing composite components should therefore focus on showing
that the component interface behaves according to its specification.
➢ Objectives are to detect faults due to interface errors or invalid assumptions about
interfaces.
➢ Interface types include:
âť– Parameter interfaces: data passed from one method or procedure to another.
âť– Shared memory interfaces: block of memory is shared between procedures or functions.
âť– Procedural interfaces: sub-system encapsulates a set of procedures to be called by
other sub-systems.
âť– Message passing interfaces: sub-systems request services from other sub-systems.
Development Testing
Dr. K. Adisesha
17
Component Testing:
Software components are often composite components that are made up of several
interacting objects. Testing composite components should therefore focus on showing
that the component interface behaves according to its specification.
➢ Interface errors:
âť– Interface misuse: a calling component calls another component and makes an error
in its use of its interface e.g. parameters in the wrong order.
âť– Interface misunderstanding: a calling component embeds assumptions about the
behavior of the called component which are incorrect.
âť– Timing errors: the called and the calling component operate at different speeds and
out-of-date information is accessed.
Development Testing
Dr. K. Adisesha
18
Component Testing:
Software components are often composite components that are made up of several
interacting objects. Testing composite components should therefore focus on showing
that the component interface behaves according to its specification.
➢ General guidelines for interface testing:
âť– Design tests so that parameters to a called procedure are at the extreme ends of
their ranges.
âť– Always test pointer parameters with null pointers.
âť– Design tests which cause the component to fail.
âť– Use stress testing in message passing systems.
âť– In shared memory systems, vary the order in which components are activated.
Development Testing
Dr. K. Adisesha
19
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 behavior of a system.
➢ 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.
Development Testing
Dr. K. Adisesha
20
System Testing:
System testing during development involves integrating components to create a version
of the system and then testing the integrated system.
➢ 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.
➢ 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 document the components and
their interactions that are being tested.
Test-Driven Development
Dr. K. Adisesha
21
Test-Driven Development:
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.
➢ This is a differentiating feature of TDD versus writing unit tests after the code is
written: it makes the developer focus on the requirements before writing the code.
➢ The code is developed 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.
Test-Driven Development
Dr. K. Adisesha
22
Test-Driven Development:
Test-driven development (TDD) is an approach to program development in which you
inter-leave testing and code development.
➢ The goal of TDD isn't to ensure we write tests by writing them first, but to produce working
software that achieves a targeted set of requirements using simple, maintainable solutions.
➢ To achieve this goal, TDD provides strategies for keeping code working, simple, relevant, and
free of duplication.
Test-Driven Development
Dr. K. Adisesha
23
Test-Driven Development:
Test-driven development (TDD) is an approach to program development in which you
inter-leave testing and code development.
➢ TDD process includes the following activities:
âť– Start by identifying the increment of functionality that is required. This should normally
be small and implementable in a few lines of code.
âť– Write a test for this functionality and implement this as an automated test.
âť– Run the test, along with all other tests that have been implemented. Initially, you have
not implemented the functionality so the new test will fail.
âť– Implement the functionality and re-run the test.
âť– Once all tests run successfully, you move on to implementing the next chunk of
functionality.
Test-Driven Development
Dr. K. Adisesha
24
Test-Driven Development:
Test-driven development (TDD) is an approach to program development in which you
inter-leave testing and code development.
➢ 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.
Test-Driven Development
Dr. K. Adisesha
25
Test-Driven Development:
Test-driven development (TDD) is an approach to program development in which you
inter-leave testing and code development.
➢ 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.
Test-Driven Development
Dr. K. Adisesha
26
Test-Driven Development:
Test-driven development (TDD) is an approach to program development in which you
inter-leave testing and code development.
➢ 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.
Release Testing
Dr. K. Adisesha
27
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 customer 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.
Release Testing
Dr. K. Adisesha
28
Release Testing:
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.
➢ The objective of release testing is to check that the system meets its requirements and is
good enough for external use (validation testing).
➢ Release testing is a form of system testing. Important differences:
âť– A separate team that has not been involved in the system development, should be
responsible for release testing.
âť– System testing by the development team should focus on discovering bugs in the
system (defect testing).
Release Testing
Dr. K. Adisesha
29
Release 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.
➢ Requirements-based testing involves examining each requirement and developing a test
or tests for it. It is validation rather than defect testing: you are trying to demonstrate
that the system has properly implemented its requirements.
➢ Scenario testing is an approach to release testing where you devise typical scenarios of
use and use these to develop test cases for the system. Scenarios should be realistic and
real system users should be able to relate to them.
➢ Stress testing is a form of performance testing where the system is deliberately
overloaded to test its failure behavior.
User Testing
Dr. K. Adisesha
30
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.
➢ Types of user testing include:
âť– 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.
User Testing
Dr. K. Adisesha
31
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.
➢ 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.
➢ Main problem here is whether or not the embedded user is 'typical' and can represent
the interests of all system stakeholders.
Discussion
Dr. K. Adisesha
32
Queries ?
Prof. K. Adisesha
9449081542
Reference: Sommerville, Software Engineering, 10 ed.,

More Related Content

Similar to Software Engineering-Unit 5 "Software Testing"by Adi.pdf

Similar to Software Engineering-Unit 5 "Software Testing"by Adi.pdf (20)

Software Testing (1).pptx
Software Testing (1).pptxSoftware Testing (1).pptx
Software Testing (1).pptx
 
softwaretesting-140721025833-phpapp02.pptx
softwaretesting-140721025833-phpapp02.pptxsoftwaretesting-140721025833-phpapp02.pptx
softwaretesting-140721025833-phpapp02.pptx
 
Different Types Of Testing
Different Types Of TestingDifferent Types Of Testing
Different Types Of Testing
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.
 
Manual testing
Manual testingManual testing
Manual testing
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Software testing and types.pptx
Software testing and types.pptxSoftware testing and types.pptx
Software testing and types.pptx
 
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software unit4
Software unit4Software unit4
Software unit4
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
Software testing techniques
Software testing techniquesSoftware testing techniques
Software testing techniques
 
Software testing
Software testingSoftware testing
Software testing
 
SDLCTesting
SDLCTestingSDLCTesting
SDLCTesting
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Testing in Software Engineering.docx
Testing in Software Engineering.docxTesting in Software Engineering.docx
Testing in Software Engineering.docx
 
Testing Slides 1 (Testing Intro+Static Testing).pdf
Testing Slides 1 (Testing Intro+Static Testing).pdfTesting Slides 1 (Testing Intro+Static Testing).pdf
Testing Slides 1 (Testing Intro+Static Testing).pdf
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Ch8
Ch8Ch8
Ch8
 
Ch8
Ch8Ch8
Ch8
 

More from Prof. Dr. K. Adisesha

Software Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfSoftware Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfSoftware Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfSoftware Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfSoftware Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfProf. Dr. K. Adisesha
 
Computer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaComputer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaCCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaProf. Dr. K. Adisesha
 
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaCCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfCCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfProf. Dr. K. Adisesha
 
Data_structure using C-Adi.pdf
Data_structure using C-Adi.pdfData_structure using C-Adi.pdf
Data_structure using C-Adi.pdfProf. Dr. K. Adisesha
 

More from Prof. Dr. K. Adisesha (20)

Software Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfSoftware Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdf
 
Software Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfSoftware Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdf
 
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfSoftware Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
 
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfSoftware Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
 
Computer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaComputer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. Adisesha
 
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaCCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
 
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaCCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. Adisesha
 
CCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfCCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdf
 
Introduction to Computers.pdf
Introduction to Computers.pdfIntroduction to Computers.pdf
Introduction to Computers.pdf
 
R_Programming.pdf
R_Programming.pdfR_Programming.pdf
R_Programming.pdf
 
Scholarship.pdf
Scholarship.pdfScholarship.pdf
Scholarship.pdf
 
Operating System-2 by Adi.pdf
Operating System-2 by Adi.pdfOperating System-2 by Adi.pdf
Operating System-2 by Adi.pdf
 
Operating System-1 by Adi.pdf
Operating System-1 by Adi.pdfOperating System-1 by Adi.pdf
Operating System-1 by Adi.pdf
 
Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
 
Data_structure using C-Adi.pdf
Data_structure using C-Adi.pdfData_structure using C-Adi.pdf
Data_structure using C-Adi.pdf
 
JAVA PPT -2 BY ADI.pdf
JAVA PPT -2 BY ADI.pdfJAVA PPT -2 BY ADI.pdf
JAVA PPT -2 BY ADI.pdf
 
JAVA PPT -5 BY ADI.pdf
JAVA PPT -5 BY ADI.pdfJAVA PPT -5 BY ADI.pdf
JAVA PPT -5 BY ADI.pdf
 
JAVA PPT -3 BY ADI.pdf
JAVA PPT -3 BY ADI.pdfJAVA PPT -3 BY ADI.pdf
JAVA PPT -3 BY ADI.pdf
 

Recently uploaded

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Recently uploaded (20)

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Software Engineering-Unit 5 "Software Testing"by Adi.pdf

  • 2. Software Engineering Unit-5 Introduction Software Testing Development Testing Test-Driven Development User Testing 2 Software Testing Dr. K. Adisesha
  • 3. Introduction Dr. K. Adisesha 3 Software 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 can reveal the presence of errors, but NOT their absence. ➢ Testing is part of a more general verification and validation process, which also includes static validation techniques.
  • 4. Software Testing Dr. K. Adisesha 4 Goals of software testing: To demonstrate to the developer and the customer that the software meets its requirements. ➢ 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. ➢ A successful test shows that the system operates as intended. ➢ To discover situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification. âť– Leads to defect testing: the test cases are designed to expose defects; the test cases can be deliberately obscure and need not reflect how the system is normally used. âť– A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system.
  • 5. Introduction Dr. K. Adisesha 5 Testing can be viewed as an input-output process:
  • 6. Software Testing Dr. K. Adisesha 6 Verification and validation: Testing is part of a broader process of software verification and validation (V & V). ➢ 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. ➢ The Goal of V & V is to establish confidence that the system is good enough for its intended use, which depends on: âť– Software purpose: the level of confidence depends on how critical the software is to an organization. âť– 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.
  • 7. Software Testing Dr. K. Adisesha 7 Inspections and testing: Software inspections 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. ➢ Inspections and testing are complementary and not opposing verification techniques. Both should be used during the V & V process. ➢ Inspections cannot check non-functional characteristics such as performance, usability, etc.
  • 8. Software Testing Dr. K. Adisesha 8 Inspections and testing: Software inspections involve people examining the source representation with the aim of discovering anomalies and defects. ➢ Inspections can check conformance with a specification but not conformance with the customer's real requirements. ➢ Typically, a commercial software system has to go through three stages of testing: âť– Development testing: the system is tested during development to discover bugs and defects. âť– Release testing: a separate testing team test a complete version of the system before it is released to users. âť– User testing: users or potential users of a system test the system in their own environment.
  • 9. Software Testing Dr. K. Adisesha 9 Inspections and testing: Software inspections involve people examining the source representation with the aim of discovering anomalies and defects. ➢ Advantages of inspections include: âť– During testing, errors can mask (hide) other errors. Because inspection is a static process, you don't have to be concerned with interactions between errors. âť– Incomplete versions of a system can be inspected without additional costs. If a program is incomplete, then you need to develop specialized test harnesses to test the parts that are available. âť– As well as searching for program defects, an inspection can also consider broader quality attributes of a program, such as compliance with standards, portability and maintainability.
  • 10. Software Testing Dr. K. Adisesha 10 Development Testing: Development testing includes all testing activities that are carried out by the team developing the system: ➢ Unit testing: individual program units or object classes are tested; should focus on testing the functionality of objects or methods. ➢ Component testing: several individual units are integrated to create composite components; should focus on testing component interfaces. ➢ System testing: some or all of the components in a system are integrated and the system is tested as a whole; should focus on testing component interactions.
  • 11. Development Testing Dr. K. Adisesha 11 Unit Testing: Unit testing is the process of testing individual components in isolation. It is a defect testing process. ➢ Unit testing should be automated so that tests are run and checked without manual intervention. 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. ➢ When testing object classes, tests should be designed to provide coverage of all of the features of the object: âť– Test all operations associated with the object; âť– Set and check the value of all attributes associated with the object; âť– Put the object into all possible states, i.e. simulate all events that cause a state change.
  • 12. Development Testing Dr. K. Adisesha 12 Unit Testing: Unit testing frameworks provide generic test classes that you extend to create specific test cases. ➢ The objective of Unit Testing is: âť– To isolate a section of code. âť– To verify the correctness of the code. âť– To test every function and procedure. âť– To fix bugs early in the development cycle and to save costs. âť– To help the developers understand the code base and enable them to make changes quickly. âť– To help with code reuse.
  • 13. Development Testing Dr. K. Adisesha 13 Unit Testing: Unit testing frameworks provide generic test classes that you extend to create specific test cases. ➢ In automated unit testing, you make use of a test automation framework (such as JUnit) to write and run your program tests. ➢ An automated test has three parts: âť– A setup part, where you initialize the system with the test case, namely the inputs and expected outputs. âť– A call part, where you call the object or method to be tested. âť– An assertion part where you compare the result of the call with the expected result. If the assertion evaluates to true, the test has been successful if false, then it has failed.
  • 14. Development Testing Dr. K. Adisesha 14 Unit Testing: The test cases should show that, when used as expected, the component that you are testing does what it is supposed to do. ➢ If there are defects in the component, these should be revealed by test cases. ➢ This leads to two types of unit test cases: âť– The first of these should reflect normal operation of a program and should show that the component works as expected. âť– The other kind of test case should be based on testing experience of where common problems arise. It should use abnormal inputs to check that these are properly processed and do not crash the component.
  • 15. Development Testing Dr. K. Adisesha 15 Types of Unit Testing: There are 2 types of Unit Testing: Manual, and Automated. ➢ There are 3 types of Unit Testing Techniques. They are âť– Black Box Testing: This testing technique is used in covering the unit tests for input, user interface, and output parts. âť– White Box Testing: This technique is used in testing the functional behavior of the system by giving the input and checking the functionality output including the internal design structure and code of the modules. âť– Gray Box Testing: This technique is used in executing the relevant test cases, test methods, and test functions, and analyzing the code performance for the modules.
  • 16. Development Testing Dr. K. Adisesha 16 Component Testing: Software components are often composite components that are made up of several interacting objects. Testing composite components should therefore focus on showing that the component interface behaves according to its specification. ➢ Objectives are to detect faults due to interface errors or invalid assumptions about interfaces. ➢ Interface types include: âť– Parameter interfaces: data passed from one method or procedure to another. âť– Shared memory interfaces: block of memory is shared between procedures or functions. âť– Procedural interfaces: sub-system encapsulates a set of procedures to be called by other sub-systems. âť– Message passing interfaces: sub-systems request services from other sub-systems.
  • 17. Development Testing Dr. K. Adisesha 17 Component Testing: Software components are often composite components that are made up of several interacting objects. Testing composite components should therefore focus on showing that the component interface behaves according to its specification. ➢ Interface errors: âť– Interface misuse: a calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order. âť– Interface misunderstanding: a calling component embeds assumptions about the behavior of the called component which are incorrect. âť– Timing errors: the called and the calling component operate at different speeds and out-of-date information is accessed.
  • 18. Development Testing Dr. K. Adisesha 18 Component Testing: Software components are often composite components that are made up of several interacting objects. Testing composite components should therefore focus on showing that the component interface behaves according to its specification. ➢ General guidelines for interface testing: âť– Design tests so that parameters to a called procedure are at the extreme ends of their ranges. âť– Always test pointer parameters with null pointers. âť– Design tests which cause the component to fail. âť– Use stress testing in message passing systems. âť– In shared memory systems, vary the order in which components are activated.
  • 19. Development Testing Dr. K. Adisesha 19 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 behavior of a system. ➢ 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.
  • 20. Development Testing Dr. K. Adisesha 20 System Testing: System testing during development involves integrating components to create a version of the system and then testing the integrated system. ➢ 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. ➢ 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 document the components and their interactions that are being tested.
  • 21. Test-Driven Development Dr. K. Adisesha 21 Test-Driven Development: 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. ➢ This is a differentiating feature of TDD versus writing unit tests after the code is written: it makes the developer focus on the requirements before writing the code. ➢ The code is developed 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.
  • 22. Test-Driven Development Dr. K. Adisesha 22 Test-Driven Development: Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. ➢ The goal of TDD isn't to ensure we write tests by writing them first, but to produce working software that achieves a targeted set of requirements using simple, maintainable solutions. ➢ To achieve this goal, TDD provides strategies for keeping code working, simple, relevant, and free of duplication.
  • 23. Test-Driven Development Dr. K. Adisesha 23 Test-Driven Development: Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. ➢ TDD process includes the following activities: âť– Start by identifying the increment of functionality that is required. This should normally be small and implementable in a few lines of code. âť– Write a test for this functionality and implement this as an automated test. âť– Run the test, along with all other tests that have been implemented. Initially, you have not implemented the functionality so the new test will fail. âť– Implement the functionality and re-run the test. âť– Once all tests run successfully, you move on to implementing the next chunk of functionality.
  • 24. Test-Driven Development Dr. K. Adisesha 24 Test-Driven Development: Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. ➢ 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.
  • 25. Test-Driven Development Dr. K. Adisesha 25 Test-Driven Development: Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. ➢ 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.
  • 26. Test-Driven Development Dr. K. Adisesha 26 Test-Driven Development: Test-driven development (TDD) is an approach to program development in which you inter-leave testing and code development. ➢ 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.
  • 27. Release Testing Dr. K. Adisesha 27 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 customer 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.
  • 28. Release Testing Dr. K. Adisesha 28 Release Testing: 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. ➢ The objective of release testing is to check that the system meets its requirements and is good enough for external use (validation testing). ➢ Release testing is a form of system testing. Important differences: âť– A separate team that has not been involved in the system development, should be responsible for release testing. âť– System testing by the development team should focus on discovering bugs in the system (defect testing).
  • 29. Release Testing Dr. K. Adisesha 29 Release 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. ➢ Requirements-based testing involves examining each requirement and developing a test or tests for it. It is validation rather than defect testing: you are trying to demonstrate that the system has properly implemented its requirements. ➢ Scenario testing is an approach to release testing where you devise typical scenarios of use and use these to develop test cases for the system. Scenarios should be realistic and real system users should be able to relate to them. ➢ Stress testing is a form of performance testing where the system is deliberately overloaded to test its failure behavior.
  • 30. User Testing Dr. K. Adisesha 30 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. ➢ Types of user testing include: âť– 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.
  • 31. User Testing Dr. K. Adisesha 31 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. ➢ 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. ➢ Main problem here is whether or not the embedded user is 'typical' and can represent the interests of all system stakeholders.
  • 32. Discussion Dr. K. Adisesha 32 Queries ? Prof. K. Adisesha 9449081542 Reference: Sommerville, Software Engineering, 10 ed.,