Title: Using component metadata to regression test componentbased software
1Using 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 ???
2Outline
- Introduction
- Background and motivation
- Component metadata
- Code-based regression test using component
metadata - Specification-based regression test using
component metadata - Conclusion
3Introduction
- 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.
4Introduction 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
5Introduction 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
6Background 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
7Background 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
8Component 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.
9Component metadata cont.
Step for gathering method profiling metadata
10Code-based regression test using component
metadata
11Code-based regression test using component
metadata cont.
12Code-based regression test using component
metadata cont.
13Code-based regression test using component
metadata cont.
14Code-based regression test using component
metadata cont.
15Code-based regression test using component
metadata cont.
16Code-based regression test using component
metadata cont.
FAULT
In Dispenser modified Val COST/COINVALUE
17Code-based regression test using component
metadata cont.
18Code-based regression test using component
metadata cont.
19Code-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
20Code-based regression test using component
metadata cont.
entry
Line 19
Dangerous branch(19,20)
T
F
Line 20
Affected edges(20,21)
Line 21
21Code-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
22Code-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.
23Code-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.
24Code-based regression test using component
metadata cont.
25Code-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.
26Code-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 .
27Specification-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.
28GB Model
29Specification-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 .
30Specification-based regression test using
component metadata cont.
31Specification-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)
34Specification-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.
35Conclusion
- Whether component metadata can be leveraged to
support and improve the cost-effectiveness of
software engineering tasks for component-based
applications has been presented.