Using component metadata to regression test componentbased software - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Using component metadata to regression test componentbased software

Description:

Published : Wiley InterScience. Presented by: ???. 2. Outline. Introduction ... Code-based regression test using component metadata ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 36
Provided by: 140187
Category:

less

Transcript and Presenter's Notes

Title: Using component metadata to regression test componentbased software


1
Using component metadata to regression test
component-based software
  • Author Alessandro Orso1, Hyunsook Do2, Gregg
    Rothermel2,
  • Mary Jean Harrold1 and David S. Rosenblum3
  • Source Softw. Test. Verif. Reliab. 2006
  • Published Wiley InterScience
  • Presented by ???

2
Outline
  • Introduction
  • Background and motivation
  • Component metadata
  • Code-based regression test using component
    metadata
  • Specification-based regression test using
    component metadata
  • Conclusion

3
Introduction
  • Component-based engineering let complicate
    software engineering tasks.
  • This article investigate an alternative method
    for supporting software engineering tasks on
    component-based application, based on the concept
    of component metadata.

4
Introduction cont.
Application A
All test suite T
use
test
Select using component metadata information and
algorithms
Component C
modify
Test suite T
test
Component C
5
Introduction cont.
  • two different types of component-metadata-based
    techniques for performing regression test
    selection on component-based software are
    investigated
  • code-based regression test selection
  • based on statement-level, method-level and
    component-level regression test selection
    algorithms
  • specification-based regression test selection,
  • based on a statechart diagram representation of
    components

6
Background and motivation
  • Metadata information currently considered address
    only a limited range of software engineering
    problems
  • such as deployment descriptions of components
    ,enhancing self-documentation , providing
    information about a components testing history
    and identifying components misuses .
  • None of this previous work has focused on
    software engineering problems currently addressed
  • for procedural-language programs, by
    program-analysis-based tools and techniques

7
Background and motivation cont.
  • Metadata
  • provide of extra data and methods with components
    would require additional effort on the part of
    component developers, including potential changes
    to development processes.
  • Regression Test Selection(RTS)
  • Most of these techniques are code-based , author
    used another technique , are specification-based,
    relying on some form of specification instead of
    code.
  • Emphasis safety, precision, efficiency

8
Component metadata
  • Component metadata consists
  • Metadata
  • information about components
  • Metamethods
  • methods associated with components that can
    compute or retrieve metadata.
  • Component metadata provide a wide range of static
    and dynamic information about a component
  • such as coverage information, built-in test
    cases, abstract representations of source code or
    assertions about security properties
  • A distinction is made between a priori and
    on-demand metadata.

9
Component metadata cont.
Step for gathering method profiling metadata
10
Code-based regression test using component
metadata
  • Example

11
Code-based regression test using component
metadata cont.
12
Code-based regression test using component
metadata cont.
13
Code-based regression test using component
metadata cont.
14
Code-based regression test using component
metadata cont.
15
Code-based regression test using component
metadata cont.
16
Code-based regression test using component
metadata cont.
FAULT
In Dispenser modified Val COST/COINVALUE
17
Code-based regression test using component
metadata cont.
18
Code-based regression test using component
metadata cont.
19
Code-based regression test using component
metadata cont.
  • DEJAVU approach 14, which utilizes
    control-flow graph (CFG) representations of the
    original and modified versions of the program,
    treating edges in the graph as entities.
  • identifies affected edges
  • that lead to statements that have been added,
    deleted or modified from CFG to CFG.
  • the algorithm uses these affected edges to infer
    a set of dangerous branches. Dangerous branches
    are branches that control the execution of
    affected edges

20
Code-based regression test using component
metadata cont.
  • Example identify edge

entry
Line 19

Dangerous branch(19,20)
T
F
Line 20
Affected edges(20,21)
Line 21
21
Code-based regression test using component
metadata cont.
  • DEJAVU approach to perform RTS
  • on VendingMachine when Dispenser is changed to
    Dispenser , DEJAVU constructs control-flow
    graphs CFG for methods in VendingMachine.
  • Result
  • Identify branch(19,23) as dangerous because it
    lead to a call to component Dispenser
  • Selected test case 4-6 and 8-24

22
Code-based regression test using component
metadata cont.
  • three types of information are required for each
    component
  • 1. coverage of the component achieved by the test
    suite for the application, when the component is
    tested within the application
  • 2. the component version
  • 3. information on the dangerous branches in the
    component, given the previous and the current
    version of the component.

23
Code-based regression test using component
metadata cont.
  • Given the metadata and metamethod , when the
    component user acquires and wishes to regression
    test Dispenser , they begin constructing a
    coverage table for Dispenser.
  • Verify that coverage metadata are available for
    Dispenser.
  • Enable the built-in instrumentation facilities in
    Dispenser.
  • For each test case t in T
  • (a) run t and gather coverage information
  • (b) use coverage information for t to
    incrementally populate the coverage table.
  • Disable the built-in coverage facilities in
    Dispenser.

24
Code-based regression test using component
metadata cont.
25
Code-based regression test using component
metadata cont.
  • Given this coverage information, then component
    user invokes DEJAVUMB on their application.
    DEJAVUMB proceeds as follows.
  • On methods contained in the users application,
    for which source code is available, DEJAVUMB
    performs its usual actions, previously described.
  • On methods contained in Dispenser DEJAVUMB
    performs the following actions
  • (a) retrieve Dispensers version number
  • (b) use this information to query Dispenser about
    the dangerous branches with respect to Dispense
  • (c) select the test cases associated with
    dangerous branches, referencing the coverage
    table.

26
Code-based regression test using component
metadata cont.
  • Using component metadata result
  • Differences between Dispenser and Dispenser
    cause branch(61,64) to be only dangerous branch
    reported.
  • Selected test case 5,6,9,11,12 and 13 six test
    case for re-execution .

27
Specification-based regression test using
component metadata
  • An approach to regression test selection based
    on UML statecharts is considered.
  • The technique applies to software that
    integrates an application A with a set of
    software components C by
  • combining specifications in the form of
    statecharts for A and C to build a global
    behavioural model,
  • identifying differences in the global behavioural
    (GB) model when a new version of C is integrated
    and
  • selecting the test cases that exercise changed
    sections of the model.

28
GB Model
29
Specification-based regression test using
component metadata cont.
  • Given a global behavioural model GB
  • generate a set of testing requirements for the
    application using any testing technique based on
    state-machine coverage.
  • These testing requirements, which are typically
    paths through the state-machine, are then used by
    the tester to generate test cases, resulting in
    test suite T .

30
Specification-based regression test using
component metadata cont.
31
Specification-based regression test using
component metadata cont.
  • To perform this task using the model composition
    approach, the component user is required to do
    the following
  • generate a new global behavioural model GB by
    composing statecharts for A with components in C
  • compare GB and GB by performing a pairwise walk
    of the two models, marking dangerous transitions,
    that is, edges that have been added, deleted or
    modified in the new model, or edges leading to
    states that differ
  • select all test cases in T that traverse at least
    one dangerous transition.

32
(No Transcript)
33
(No Transcript)
34
Specification-based regression test using
component metadata cont.
  • Result
  • Algorithm identifies the transition from
    ReadyToDispenseEnabled to DispensingEnabledAvail
    as dangerous
  • Test Requirement 8 and 10, so two associated test
    case are selected.

35
Conclusion
  • Whether component metadata can be leveraged to
    support and improve the cost-effectiveness of
    software engineering tasks for component-based
    applications has been presented.
Write a Comment
User Comments (0)
About PowerShow.com