SlideShare a Scribd company logo
Jonathan Misurda (jmisurda@cs.pitt.edu)
James A. Clause, Juliya L. Reed, Bruce R. Childers
Department of Computer Science
University of Pittsburgh
Pittsburgh, Pennsylvania 15260 USA
Mary Lou Soffa
Department of Computer Science
University of Virginia
Charlottesville, Virginia 22904 USA
Demand-Driven Structural Testing
with Dynamic Instrumentation
Software Testing
n  What is Software Testing?
q  Gather information about the behavior of the software being
developed or modified.
n  Why test software?
q  Gain confidence and insights into software correctness
q  Create quality, robust programs
n  Why is testing hard?
q  Testing is expensive
n  50-60% of the total cost of software development
q  Adds complexity to development process
n  One testing technique is not enough
Structural Software Testing
n  Structural Testing
q  The process of discovering run-time properties of a
program specifically pertaining to control-flow
q  Demonstrate adequacy of the test cases
q  Different granularities of structures:
n  Node coverage records statements (basic blocks)
n  Branch coverage records control-flow edges
n  Def-Use coverage records pairs of variable definitions
and uses
q  Over multiple test cases until coverage criteria
Current Testing Tools
n  E.g.: JCover, Clover, IBM Rational PurifyPlus
n  Static instrumentation with test probes
q  Probes are injected instrumentation to gather coverage
information
n  Limitations:
q  Expensive in both time and space
q  Only one type of test
q  Limited code regions and scopes
q  Cannot define their own ways to test
Our Approach
n  Demand-driven structural testing
q  Specification driven: User written tests
q  Test plans: Recipe of how & where to test
q  Path specific: Instrument only what is needed
q  Dynamic: Insert & remove instrumentation
n  Jazz: A scalable & flexible framework for testing
q  Automatically apply multiple test strategies
q  Handle large programs
q  Allows user customization of tests
Jazz Overview
Application
IDE & Test GUI
Test Specification
Test Planner
Test Plan
Test Analyzer and Result Reporter
Test Dynamic Instrumenter
Test Results
Select the regions and test types
Allows user customization
Automatically generate where and
how to instrument
Run the program with demand-driven
instrumentation
Collect the results
Test Specifier
1a
1b
3
2
Specify the regions to test
1a. Highlight line regions
1b. Select classes and methods
List of desired tests
Click to create a test
Test Planner
n  Test plan: Where and how to test program
n  Test storage, probe location table,
instrumentation payload
n  Can combine payloads to create custom strategies
Application
Test
Planner
Test
Specification
Test Instrumentation
Payload
Test Plan
Global Storage & Probe Location Table
Test Planner
n  Challenges:
q  When to insert test probes
q  Where to test/instrument
q  What to do at each probe
n  A planner determines three things:
q  Seed Probe Set – probes which are initially inserted in a
test region.
q  Coverage Probe Set – probes that can be inserted and
removed on demand along a path.
q  Probe Lifetime – whether a probe must be re-inserted
after being hit by its “control flow successor” basic blocks.
Branch Coverage Example Plan
public class simpleDemo {
public static void main(String[] args) {
int evenSum = 0;
int oddSum = 0;
for(int i = 0; i < 100; i++) {
if(i%2==0) {
evenSum += i;
}
else {
oddSum += i;
}
}
System.out.println("The sum of the even numbers from 0 to 100 is: " + evenSum);
System.out.println("The sum of the odd numbers from 0 to 100 is: " + oddSum);
}
}
DEFINITIONS {
NAME: d_method, REGION_D,
LOCATION: FILE simpleDemo.java {
CLASS simpleDemo, METHOD main
}
}
BODY {
DO BRANCH_TEST ON REGION d_method UNTIL: 85%
}
simpleDemo.java
simpleDemo.testspec
Branch Coverage Planner
n  Record which edges are executed
q  Determine (source, sink) edge pairs hit at run-time
q  Source is a branch
q  Sink can be taken & not-taken target of branch
Probe Set Members
Seed Probe First block in testing region
Coverage Probe Sinks of currently instrumented block
Probe Lifetime Until all incoming edges have been
covered
Branch Coverage Example
Probe Loc Tab Storage
Block Next Hit
1 2,3
2 4
3 4
4 1
Test Payload
Mark edge hit
Insert at next point
Remove instrumentation
1
2 3
4
Coverage probe
Hit
N, N
N
N
N
Y, Y
Y
Y
Y
Seed probe
Demo
n  Branch coverage of music player
q  Test region is whole program (JOrbis)
q  Test input is a song
n  Compared
q  Traditional approach with static instrumentation
q  Demand-driven approach with dynamic instrumentation
With Dynamic
Instrumentation
With Static
Instrumentation
Demo
n  Branch coverage of music player
q  Test region is whole program (JOrbis)
q  Test input is a song
n  Compared
q  Traditional approach with static instrumentation
q  Demand-driven approach with dynamic instrumentation
With Dynamic
Instrumentation
With Static
Instrumentation
Demo
n  Branch coverage of music player
q  Test region is whole program (JOrbis)
q  Test input is a song
n  Compared
q  Traditional approach with static instrumentation
q  Demand-driven approach with dynamic instrumentation
With Dynamic
Instrumentation
With Static
Instrumentation
Other Planners
n  Node Coverage Planner
q  Record which statements are executed
Probe Set Members
Seed Probe First statement in the testing region
Coverage Probe Next reachable statement
Probe Lifetime Removed as soon as statement is executed
n  Def-Use Coverage Planner
q  Record which variable definition reaches an executed use
Probe Set Members
Seed Probe All variable definitions
Coverage Probe Uses associated with all definitions
Probe Lifetime Defs removed after all reachable uses are
covered. Uses are removed as executed
Dynamic Instrumentation
n  Test plan targets an instrumentation API
n  FIST instrumentation engine [WOSS’04]
q  Retargetable & reconfigurable
q  Dynamic insertion & removal of instrumentation
q  Binary level instrumentation (post JIT)
n  Uses fast breakpoints [Kessler]: Replace existing
instruction with a jump to instrumentation
Experimental Methodology
n  Test Specification
q  Implemented as an Eclipse 3.0 plugin
n  Test Planner & Dynamic Instrumenter
q  Implemented using the Jikes RVM version 2.1.1
q  On the x86 platform
n  SPECjvm98 benchmarks test input
q  unloaded 2.4 Ghz Pentium IV, 1GB of memory
q  RedHat Linux 7.3
n  Traditional vs. Jazz (in same implementation)
q  Compared coverage, run-time, memory
Coverage Results
n  Coverage – same reported by both tools
Branch Node Def-Use
compress	

 58% 90.6% 89.8%
jess	

 46.8% 80.3% 71.8%
db	

 44.4% 76.9% 75.0%
javac	

 38.9% 75.0% 66.9%
mpegaudio	

 60.9% 88.7% 90.5%
mtrt	

 50.6% 90.3% 87.3%
jack	

 55.6% 82.2% 73.4%
Run-time Performance
Static Branch
Dynamic Branch
Static Node Static Def-Use
Dynamic Node Dynamic Def-Use
Memory Requirements
Branch Node Def-Use
Demand Static Demand Static Demand Static
compress	

 7.9	

 7.5	

 4.4 3.7 8.8 5.6
jess	

 50.2	

 60.3	

 34.1 29.7 70.3 44.8
db	

 9.7	

 8.9	

 5.0 4.1 9.8 5.1
javac	

 178.9	

 186	

 107.3 85.3 202.0 125.3
mpegaudio	

 24.7	

 29.5	

 15.0 14.7 34.8 22.3
mtrt	

 22.4	

 23	

 12.5 11.0 26.1 16.1
jack	

 73.4	

 78	

 46.5 37.6 89.0 46.8
• In Kilobytes
Summary
n  New demand-driven approach
q  A tool (Jazz) for structural testing
q  Dynamic instrumentation guided by a program’s
execution
q  Minimally intrusive
q  User configurable and flexible testing
n  Very low overhead
q  E.g., branch coverage tool is 3-4x faster than
traditional approaches
For Further Information…
jmisurda@cs.pitt.edu
http://www.cs.pitt.edu/coco
Test Results
1 Click to run test suite
2 Results
Static Instrumentation
n  Shortcomings of static instrumentation:
q  Not scalable: Instrumentation left in place causes
unnecessary increase in overhead
q  Inflexible: Only certain tests, languages, and
platforms
q  Cumbersome: Requires recompilations for
dedicated testing
q  Intrusive: Addition of testing code may alter or
mask defects
Run-time Performance
-10%
30%
70%
110%
150%
190%
230%
270%
compress jess db javac mpeg mtrt jack avg
%slowdownoverbaseline
Static Branch Dynamic Branch Static Node
Dynamic Node Static Def-Use Dynamic Def-Use
Branch Testing
0
10
20
30
40
50
60
70
80
90
100
Time(seconds)
compress jess db javac mpeg mtrt jack avg
Dynamic Static None
Node Testing
0
10
20
30
40
50
60
70
80
90
100
Time(seconds)
compress jess db javac mpeg mtrt jack avg
Dynamic Static None
Def-Use Testing
0
10
20
30
40
50
60
70
80
90
100
Time(seconds)
compress jess db javac mpeg mtrt jack avg
Dynamic Static None

More Related Content

Similar to Demand-Driven Structural Testing with Dynamic Instrumentation (ICSE 2005)

Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
HostedbyConfluent
 
Triantafyllia Voulibasi
Triantafyllia VoulibasiTriantafyllia Voulibasi
Triantafyllia Voulibasi
ISSEL
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
OPNFV
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
guest1f2740
 
Testing process
Testing processTesting process
Testing process
Terry Cho
 
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
Kevin Moran
 
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
Sandia National Laboratories: Energy & Climate: Renewables
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
Iosif Itkin
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van Nghi
eXo Platform
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
C4Media
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptx
maheshwari581940
 
Towards Automated A/B Testing
Towards Automated A/B TestingTowards Automated A/B Testing
Towards Automated A/B Testing
Giordano Tamburrelli
 
Presentation sem 1.pptx
Presentation sem 1.pptxPresentation sem 1.pptx
Presentation sem 1.pptx
dendi65
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
DrTThendralCompSci
 
Risk based testing and random testing
Risk based testing and random testingRisk based testing and random testing
Risk based testing and random testing
Himanshu
 
Program Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit AdaptorProgram Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit Adaptor
Michael Pankov
 
Java Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth RoundJava Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth Round
Annibale Panichella
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJTed Leung
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
Mark Price
 

Similar to Demand-Driven Structural Testing with Dynamic Instrumentation (ICSE 2005) (20)

Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
 
Triantafyllia Voulibasi
Triantafyllia VoulibasiTriantafyllia Voulibasi
Triantafyllia Voulibasi
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Testing process
Testing processTesting process
Testing process
 
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
A Large-Scale Empirical Comparison of Static and DynamicTest Case Prioritizat...
 
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
Jonathan Naughton - V&V of Models for Wind Turbine and Wind Plant Aerodynamic...
 
slides
slidesslides
slides
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van Nghi
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptx
 
Towards Automated A/B Testing
Towards Automated A/B TestingTowards Automated A/B Testing
Towards Automated A/B Testing
 
Presentation sem 1.pptx
Presentation sem 1.pptxPresentation sem 1.pptx
Presentation sem 1.pptx
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
Risk based testing and random testing
Risk based testing and random testingRisk based testing and random testing
Risk based testing and random testing
 
Program Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit AdaptorProgram Performance Analysis Toolkit Adaptor
Program Performance Analysis Toolkit Adaptor
 
Java Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth RoundJava Unit Testing Tool Competition — Fifth Round
Java Unit Testing Tool Competition — Fifth Round
 
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJSeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
SeaJUG Dec 2001: Aspect-Oriented Programming with AspectJ
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
 

More from James Clause

Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...
Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...
Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...James Clause
 
Energy-directed Test Suite Optimization (GREENS 2013)
Energy-directed Test Suite Optimization (GREENS 2013)Energy-directed Test Suite Optimization (GREENS 2013)
Energy-directed Test Suite Optimization (GREENS 2013)James Clause
 
Enabling and Supporting the Debugging of Field Failures (Job Talk)
Enabling and Supporting the Debugging of Field Failures (Job Talk)Enabling and Supporting the Debugging of Field Failures (Job Talk)
Enabling and Supporting the Debugging of Field Failures (Job Talk)James Clause
 
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)James Clause
 
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...James Clause
 
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)James Clause
 
Initial Explorations on Design Pattern Energy Usage (GREENS 12)
Initial Explorations on Design Pattern Energy Usage (GREENS 12)Initial Explorations on Design Pattern Energy Usage (GREENS 12)
Initial Explorations on Design Pattern Energy Usage (GREENS 12)James Clause
 
Enabling and Supporting the Debugging of Software Failures (PhD Defense)
Enabling and Supporting the Debugging of Software Failures (PhD Defense)Enabling and Supporting the Debugging of Software Failures (PhD Defense)
Enabling and Supporting the Debugging of Software Failures (PhD Defense)James Clause
 
Taint-based Dynamic Analysis (CoC Research Day 2009)
Taint-based Dynamic Analysis (CoC Research Day 2009)Taint-based Dynamic Analysis (CoC Research Day 2009)
Taint-based Dynamic Analysis (CoC Research Day 2009)James Clause
 
Effective Memory Protection Using Dynamic Tainting (ASE 2007)
Effective Memory Protection Using Dynamic Tainting (ASE 2007)Effective Memory Protection Using Dynamic Tainting (ASE 2007)
Effective Memory Protection Using Dynamic Tainting (ASE 2007)James Clause
 
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)James Clause
 
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)James Clause
 
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)James Clause
 
Camouflage: Automated Anonymization of Field Data (ICSE 2011)
Camouflage: Automated Anonymization of Field Data (ICSE 2011)Camouflage: Automated Anonymization of Field Data (ICSE 2011)
Camouflage: Automated Anonymization of Field Data (ICSE 2011)James Clause
 

More from James Clause (14)

Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...
Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...
Investigating the Impacts of Web Servers on Web Application Energy Usage (GRE...
 
Energy-directed Test Suite Optimization (GREENS 2013)
Energy-directed Test Suite Optimization (GREENS 2013)Energy-directed Test Suite Optimization (GREENS 2013)
Energy-directed Test Suite Optimization (GREENS 2013)
 
Enabling and Supporting the Debugging of Field Failures (Job Talk)
Enabling and Supporting the Debugging of Field Failures (Job Talk)Enabling and Supporting the Debugging of Field Failures (Job Talk)
Enabling and Supporting the Debugging of Field Failures (Job Talk)
 
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)
Leakpoint: Pinpointing the Causes of Memory Leaks (ICSE 2010)
 
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...
Debugging Field Failures by Minimizing Captured Executions (ICSE 2009: NIER e...
 
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)
A Technique for Enabling and Supporting Debugging of Field Failures (ICSE 2007)
 
Initial Explorations on Design Pattern Energy Usage (GREENS 12)
Initial Explorations on Design Pattern Energy Usage (GREENS 12)Initial Explorations on Design Pattern Energy Usage (GREENS 12)
Initial Explorations on Design Pattern Energy Usage (GREENS 12)
 
Enabling and Supporting the Debugging of Software Failures (PhD Defense)
Enabling and Supporting the Debugging of Software Failures (PhD Defense)Enabling and Supporting the Debugging of Software Failures (PhD Defense)
Enabling and Supporting the Debugging of Software Failures (PhD Defense)
 
Taint-based Dynamic Analysis (CoC Research Day 2009)
Taint-based Dynamic Analysis (CoC Research Day 2009)Taint-based Dynamic Analysis (CoC Research Day 2009)
Taint-based Dynamic Analysis (CoC Research Day 2009)
 
Effective Memory Protection Using Dynamic Tainting (ASE 2007)
Effective Memory Protection Using Dynamic Tainting (ASE 2007)Effective Memory Protection Using Dynamic Tainting (ASE 2007)
Effective Memory Protection Using Dynamic Tainting (ASE 2007)
 
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
Advanced Dynamic Analysis for Leak Detection (Apple Internship 2008)
 
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)
Penumbra: Automatically Identifying Failure-Relevant Inputs (ISSTA 2009)
 
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)
Dytan: A Generic Dynamic Taint Analysis Framework (ISSTA 2007)
 
Camouflage: Automated Anonymization of Field Data (ICSE 2011)
Camouflage: Automated Anonymization of Field Data (ICSE 2011)Camouflage: Automated Anonymization of Field Data (ICSE 2011)
Camouflage: Automated Anonymization of Field Data (ICSE 2011)
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

Demand-Driven Structural Testing with Dynamic Instrumentation (ICSE 2005)

  • 1. Jonathan Misurda (jmisurda@cs.pitt.edu) James A. Clause, Juliya L. Reed, Bruce R. Childers Department of Computer Science University of Pittsburgh Pittsburgh, Pennsylvania 15260 USA Mary Lou Soffa Department of Computer Science University of Virginia Charlottesville, Virginia 22904 USA Demand-Driven Structural Testing with Dynamic Instrumentation
  • 2. Software Testing n  What is Software Testing? q  Gather information about the behavior of the software being developed or modified. n  Why test software? q  Gain confidence and insights into software correctness q  Create quality, robust programs n  Why is testing hard? q  Testing is expensive n  50-60% of the total cost of software development q  Adds complexity to development process n  One testing technique is not enough
  • 3. Structural Software Testing n  Structural Testing q  The process of discovering run-time properties of a program specifically pertaining to control-flow q  Demonstrate adequacy of the test cases q  Different granularities of structures: n  Node coverage records statements (basic blocks) n  Branch coverage records control-flow edges n  Def-Use coverage records pairs of variable definitions and uses q  Over multiple test cases until coverage criteria
  • 4. Current Testing Tools n  E.g.: JCover, Clover, IBM Rational PurifyPlus n  Static instrumentation with test probes q  Probes are injected instrumentation to gather coverage information n  Limitations: q  Expensive in both time and space q  Only one type of test q  Limited code regions and scopes q  Cannot define their own ways to test
  • 5. Our Approach n  Demand-driven structural testing q  Specification driven: User written tests q  Test plans: Recipe of how & where to test q  Path specific: Instrument only what is needed q  Dynamic: Insert & remove instrumentation n  Jazz: A scalable & flexible framework for testing q  Automatically apply multiple test strategies q  Handle large programs q  Allows user customization of tests
  • 6. Jazz Overview Application IDE & Test GUI Test Specification Test Planner Test Plan Test Analyzer and Result Reporter Test Dynamic Instrumenter Test Results Select the regions and test types Allows user customization Automatically generate where and how to instrument Run the program with demand-driven instrumentation Collect the results
  • 7. Test Specifier 1a 1b 3 2 Specify the regions to test 1a. Highlight line regions 1b. Select classes and methods List of desired tests Click to create a test
  • 8. Test Planner n  Test plan: Where and how to test program n  Test storage, probe location table, instrumentation payload n  Can combine payloads to create custom strategies Application Test Planner Test Specification Test Instrumentation Payload Test Plan Global Storage & Probe Location Table
  • 9. Test Planner n  Challenges: q  When to insert test probes q  Where to test/instrument q  What to do at each probe n  A planner determines three things: q  Seed Probe Set – probes which are initially inserted in a test region. q  Coverage Probe Set – probes that can be inserted and removed on demand along a path. q  Probe Lifetime – whether a probe must be re-inserted after being hit by its “control flow successor” basic blocks.
  • 10. Branch Coverage Example Plan public class simpleDemo { public static void main(String[] args) { int evenSum = 0; int oddSum = 0; for(int i = 0; i < 100; i++) { if(i%2==0) { evenSum += i; } else { oddSum += i; } } System.out.println("The sum of the even numbers from 0 to 100 is: " + evenSum); System.out.println("The sum of the odd numbers from 0 to 100 is: " + oddSum); } } DEFINITIONS { NAME: d_method, REGION_D, LOCATION: FILE simpleDemo.java { CLASS simpleDemo, METHOD main } } BODY { DO BRANCH_TEST ON REGION d_method UNTIL: 85% } simpleDemo.java simpleDemo.testspec
  • 11. Branch Coverage Planner n  Record which edges are executed q  Determine (source, sink) edge pairs hit at run-time q  Source is a branch q  Sink can be taken & not-taken target of branch Probe Set Members Seed Probe First block in testing region Coverage Probe Sinks of currently instrumented block Probe Lifetime Until all incoming edges have been covered
  • 12. Branch Coverage Example Probe Loc Tab Storage Block Next Hit 1 2,3 2 4 3 4 4 1 Test Payload Mark edge hit Insert at next point Remove instrumentation 1 2 3 4 Coverage probe Hit N, N N N N Y, Y Y Y Y Seed probe
  • 13. Demo n  Branch coverage of music player q  Test region is whole program (JOrbis) q  Test input is a song n  Compared q  Traditional approach with static instrumentation q  Demand-driven approach with dynamic instrumentation With Dynamic Instrumentation With Static Instrumentation
  • 14. Demo n  Branch coverage of music player q  Test region is whole program (JOrbis) q  Test input is a song n  Compared q  Traditional approach with static instrumentation q  Demand-driven approach with dynamic instrumentation With Dynamic Instrumentation With Static Instrumentation
  • 15. Demo n  Branch coverage of music player q  Test region is whole program (JOrbis) q  Test input is a song n  Compared q  Traditional approach with static instrumentation q  Demand-driven approach with dynamic instrumentation With Dynamic Instrumentation With Static Instrumentation
  • 16. Other Planners n  Node Coverage Planner q  Record which statements are executed Probe Set Members Seed Probe First statement in the testing region Coverage Probe Next reachable statement Probe Lifetime Removed as soon as statement is executed n  Def-Use Coverage Planner q  Record which variable definition reaches an executed use Probe Set Members Seed Probe All variable definitions Coverage Probe Uses associated with all definitions Probe Lifetime Defs removed after all reachable uses are covered. Uses are removed as executed
  • 17. Dynamic Instrumentation n  Test plan targets an instrumentation API n  FIST instrumentation engine [WOSS’04] q  Retargetable & reconfigurable q  Dynamic insertion & removal of instrumentation q  Binary level instrumentation (post JIT) n  Uses fast breakpoints [Kessler]: Replace existing instruction with a jump to instrumentation
  • 18. Experimental Methodology n  Test Specification q  Implemented as an Eclipse 3.0 plugin n  Test Planner & Dynamic Instrumenter q  Implemented using the Jikes RVM version 2.1.1 q  On the x86 platform n  SPECjvm98 benchmarks test input q  unloaded 2.4 Ghz Pentium IV, 1GB of memory q  RedHat Linux 7.3 n  Traditional vs. Jazz (in same implementation) q  Compared coverage, run-time, memory
  • 19. Coverage Results n  Coverage – same reported by both tools Branch Node Def-Use compress 58% 90.6% 89.8% jess 46.8% 80.3% 71.8% db 44.4% 76.9% 75.0% javac 38.9% 75.0% 66.9% mpegaudio 60.9% 88.7% 90.5% mtrt 50.6% 90.3% 87.3% jack 55.6% 82.2% 73.4%
  • 20. Run-time Performance Static Branch Dynamic Branch Static Node Static Def-Use Dynamic Node Dynamic Def-Use
  • 21. Memory Requirements Branch Node Def-Use Demand Static Demand Static Demand Static compress 7.9 7.5 4.4 3.7 8.8 5.6 jess 50.2 60.3 34.1 29.7 70.3 44.8 db 9.7 8.9 5.0 4.1 9.8 5.1 javac 178.9 186 107.3 85.3 202.0 125.3 mpegaudio 24.7 29.5 15.0 14.7 34.8 22.3 mtrt 22.4 23 12.5 11.0 26.1 16.1 jack 73.4 78 46.5 37.6 89.0 46.8 • In Kilobytes
  • 22. Summary n  New demand-driven approach q  A tool (Jazz) for structural testing q  Dynamic instrumentation guided by a program’s execution q  Minimally intrusive q  User configurable and flexible testing n  Very low overhead q  E.g., branch coverage tool is 3-4x faster than traditional approaches
  • 24. Test Results 1 Click to run test suite 2 Results
  • 25. Static Instrumentation n  Shortcomings of static instrumentation: q  Not scalable: Instrumentation left in place causes unnecessary increase in overhead q  Inflexible: Only certain tests, languages, and platforms q  Cumbersome: Requires recompilations for dedicated testing q  Intrusive: Addition of testing code may alter or mask defects
  • 26. Run-time Performance -10% 30% 70% 110% 150% 190% 230% 270% compress jess db javac mpeg mtrt jack avg %slowdownoverbaseline Static Branch Dynamic Branch Static Node Dynamic Node Static Def-Use Dynamic Def-Use
  • 27. Branch Testing 0 10 20 30 40 50 60 70 80 90 100 Time(seconds) compress jess db javac mpeg mtrt jack avg Dynamic Static None
  • 28. Node Testing 0 10 20 30 40 50 60 70 80 90 100 Time(seconds) compress jess db javac mpeg mtrt jack avg Dynamic Static None
  • 29. Def-Use Testing 0 10 20 30 40 50 60 70 80 90 100 Time(seconds) compress jess db javac mpeg mtrt jack avg Dynamic Static None