Testing off the shelf Components

Dr. Himanshu Hora
SRMS College of Engineering & Technology
Bareilly (INDIA)
Outline :
 Introduction to COTS components
 Advantages of COTS components
 Challenges in testing COTS components
 Testing types of COTS components
 References
Introduction:
What is Component Based Software Engineering (CBSE)?
 Idea to develop software systems by selecting appropriate
off-the-shelf components and then assemble them with a
well-defined software architecture.
 CBSE has three major functions:
Developing software from prefabricated, reusable
parts.
The ability to use those parts in other applications.
Easily maintaining and customizing those parts to
produce new functions and features.
What is a COTS component:
What is a Commercial Off the shelf (COTS) component:

 Independent and replaceable part of a system that fulfills a
clear function
 Works in the context of a well defined architecture
 A component communicates with other components by its
interfaces
 Developed by different developers, using different
languages and different platforms
Contd….
Component 1

Component
repository

select

Component 2

Software system

Component n

assemble
Advantages of COTS:
Development cost is reduced
Development time is reduced
Complex systems can be built by reusing pre-existing
components
Testing effort is reduced
Testing Components: Challenges
 COTS is a Black Box
 Lack of Functional and Technical Requirements
 The Level of Quality is Unknown
 Unknown Development Processes and Methods
 Compatibility Issues
 Uncertain Upgrade Schedules and Quality
 Difficulty in Regression Testing and Test Automation
 Interoperability and Integration Issues
Testing techniques:
 Black-box component testing
 System-level fault injection
 Operational system testing
 Software Wrapping

 Interface propagation Analysis
Black box Testing:
 To understand the behavior of a component, various
inputs are executed and outputs are analyzed
 To catch all types of errors all possible combinations of
input values should be executed
 To make testing feasible, test cases are selected
randomly from test case space
Contd….
Fault Injection:

request
Fault
simulation
tool

Erroneous or
malicious input

Component

Fault
simulation
tool

Exceptions, No
response
Contd….

 A technique for improving the coverage of a test by
introducing faults to test code paths
 Fault propagate through to an observable failure follows
a well defined cycle
 When executed, a fault may cause an error, which is an
invalid state within a system boundary
 An error may cause further errors within the system
boundary
 Each new error acts as a fault
 When error states are observed at the system boundary
they are termed failures
 This is termed the fault-error-failure cycle
Contd….
Operational system testing:
 complements system-level fault injection
 System is operated with random inputs (valid and invalid
inputs)

 Provides more accurate assessment of COTS quality
 A key operational testing feature is error detection,
which ensures correct functional implementation
 Operational testing allows component interaction
Software Wrapping :
Input wrapper

Input

Output wrapper

Component

output
Contd….

 Wrapper: generally refers to a type of packaging, such as
a flat sheet to enclose an object
 It is a piece of code that one builds to isolate the
underlying components from other components of the
system
 Glue: A glue component provides the functionality to
combine different components
Interface propagation Analysis:

COTS
Component 1

Fault Injector

 Modify input, call correct method.
 Call correct method, modify output.

COTS
Component 2
Contd….

 Interface Propagation Analysis is used by injecting faults
at one component
 This is done at component integration level

 A known faulty input is injected using fault injector into
the system
 Components effected by this input are observed (how
they handle the faulty input)
Refrences:
 http://www.cigital.com/presentations/zurich98/sld087.h
tm
 http://my.safaribooksonline.com/book/softwareengineering-and-development/softwaretesting/0201325640/testing-interactions/ch06lev1sec4
 http://my.safaribooksonline.com/book/softwareengineering-and-development/softwaretesting/0201325640/testing-interactions/ch06lev1sec4
Thank You

Dr. Himanshu Hora
SRMS College of Engineering & Technology
Bareilly (INDIA)

Off the-shelf components (cots)

  • 1.
    Testing off theshelf Components Dr. Himanshu Hora SRMS College of Engineering & Technology Bareilly (INDIA)
  • 2.
    Outline :  Introductionto COTS components  Advantages of COTS components  Challenges in testing COTS components  Testing types of COTS components  References
  • 3.
    Introduction: What is ComponentBased Software Engineering (CBSE)?  Idea to develop software systems by selecting appropriate off-the-shelf components and then assemble them with a well-defined software architecture.  CBSE has three major functions: Developing software from prefabricated, reusable parts. The ability to use those parts in other applications. Easily maintaining and customizing those parts to produce new functions and features.
  • 4.
    What is aCOTS component: What is a Commercial Off the shelf (COTS) component:  Independent and replaceable part of a system that fulfills a clear function  Works in the context of a well defined architecture  A component communicates with other components by its interfaces  Developed by different developers, using different languages and different platforms
  • 5.
  • 6.
    Advantages of COTS: Developmentcost is reduced Development time is reduced Complex systems can be built by reusing pre-existing components Testing effort is reduced
  • 7.
    Testing Components: Challenges COTS is a Black Box  Lack of Functional and Technical Requirements  The Level of Quality is Unknown  Unknown Development Processes and Methods  Compatibility Issues  Uncertain Upgrade Schedules and Quality  Difficulty in Regression Testing and Test Automation  Interoperability and Integration Issues
  • 8.
    Testing techniques:  Black-boxcomponent testing  System-level fault injection  Operational system testing  Software Wrapping  Interface propagation Analysis
  • 9.
    Black box Testing: To understand the behavior of a component, various inputs are executed and outputs are analyzed  To catch all types of errors all possible combinations of input values should be executed  To make testing feasible, test cases are selected randomly from test case space
  • 10.
  • 11.
    Fault Injection: request Fault simulation tool Erroneous or maliciousinput Component Fault simulation tool Exceptions, No response
  • 12.
    Contd….  A techniquefor improving the coverage of a test by introducing faults to test code paths  Fault propagate through to an observable failure follows a well defined cycle  When executed, a fault may cause an error, which is an invalid state within a system boundary  An error may cause further errors within the system boundary  Each new error acts as a fault  When error states are observed at the system boundary they are termed failures  This is termed the fault-error-failure cycle
  • 13.
  • 16.
    Operational system testing: complements system-level fault injection  System is operated with random inputs (valid and invalid inputs)  Provides more accurate assessment of COTS quality  A key operational testing feature is error detection, which ensures correct functional implementation  Operational testing allows component interaction
  • 17.
    Software Wrapping : Inputwrapper Input Output wrapper Component output
  • 18.
    Contd….  Wrapper: generallyrefers to a type of packaging, such as a flat sheet to enclose an object  It is a piece of code that one builds to isolate the underlying components from other components of the system  Glue: A glue component provides the functionality to combine different components
  • 19.
    Interface propagation Analysis: COTS Component1 Fault Injector  Modify input, call correct method.  Call correct method, modify output. COTS Component 2
  • 20.
    Contd….  Interface PropagationAnalysis is used by injecting faults at one component  This is done at component integration level  A known faulty input is injected using fault injector into the system  Components effected by this input are observed (how they handle the faulty input)
  • 21.
  • 22.
    Thank You Dr. HimanshuHora SRMS College of Engineering & Technology Bareilly (INDIA)