SlideShare a Scribd company logo
1 of 56
Download to read offline
@_jon_bell_ESEC/FSE September 4, 2015
Efficient Dependency
Detection for Safe Java
Test Acceleration
Jonathan Bell, Gail Kaiser, Eric Melski and Mohan Dattatreya
Columbia University & Electric Cloud, Inc
@_jon_bell_ESEC/FSE September 4, 2015
Simplified Software Lifecycle
Make changes to code
Build & test
Commit
How long is too long of a build?
1 day? 6 hours? 10 minutes?
@_jon_bell_ESEC/FSE September 4, 2015
Simplified Software Lifecycle
• Compile sources
• Generate documentation
• Run tests
• Package
Make changes to code Build & test Commit
@_jon_bell_ESEC/FSE September 4, 2015
Testing Dominates Build Times
20%
38%
41%
351 projects from GitHub
Testing
Other
Compiling
@_jon_bell_ESEC/FSE September 4, 2015
Testing Dominates Build Times
14%
26%
60%
Projects taking > 10 minutes to build (69)
Testing
Other
Compiling
@_jon_bell_ESEC/FSE September 4, 2015
Testing Dominates Build Times
2%8%
90%
Projects taking > 1 hour to build (8)
Testing
OtherCompiling
Faster tests = Faster builds
Test acceleration is
well studied
@_jon_bell_ESEC/FSE September 4, 2015
Regression Test Selection
Test 1 Test 2 Test 3
Test 8 Test 9 Test 10
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
Gligoric et al. [ISSTA ’15], Orso et al. [FSE ’04], Harrold et al. [OOPSLA ’01]
Changeset
@_jon_bell_ESEC/FSE September 4, 2015
Regression Test Selection
Test 1 Test 3
Test 8
Test 4
Gligoric et al. [ISSTA ’15], Orso et al. [FSE ’04], Harrold et al. [OOPSLA ’01]
Changeset
Tests not relevant to changeset: skipped
@_jon_bell_ESEC/FSE September 4, 2015
Test Suite Minimization
Test 1 Test 2 Test 3
Test 8 Test 9 Test 10
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
< /> Code
Hao et al. [ICSE ’12]; Orso et al. [ICSE ’09]; Jeffrey et al. [TSE ’07]; Tallam et
al. [PASTE ’05]; Jones et al. [TOSEM ’03]; Harrold et al. [TOSEM ’93]; Chen et
al. [IST ’98]; Wong et al. [ICSE ’95] and more
@_jon_bell_ESEC/FSE September 4, 2015
Test Suite Minimization
Test 3
Test 8 Test 9 Test 10
Test 4 Test 5 Test 6 Test 7
Test 11 Test 13 Test 14
< /> Code
Hao et al. [ICSE ’12]; Orso et al. [ICSE ’09]; Jeffrey et al. [TSE ’07]; Tallam et
al. [PASTE ’05]; Jones et al. [TOSEM ’03]; Harrold et al. [TOSEM ’93]; Chen et
al. [IST ’98]; Wong et al. [ICSE ’95] and more
Redundant tests: removed
@_jon_bell_ESEC/FSE September 4, 2015
Test Parallelization
Test 1 Test 2 Test 3
Test 8 Test 9 Test 10
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
@_jon_bell_ESEC/FSE September 4, 2015
Test Parallelization
Test 1 Test 2 Test 3
Test 8 Test 9
Test 10
Test 4
Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
@_jon_bell_ESEC/FSE September 4, 2015
Controlled Regression
Testing Assumption
Tests
</>
Code
@_jon_bell_ESEC/FSE September 4, 2015
Controlled Regression
Testing Assumption
Tests
</>
Code
External Factors
External Factors External Factors
External Factors
@_jon_bell_ESEC/FSE September 4, 2015
Controlled Regression
Testing Assumption
Tests
</>
Code
External Factors
External Factors External Factors
External Factors
Test 1
@_jon_bell_ESEC/FSE September 4, 2015
Controlled Regression
Testing Assumption
Tests
</>
Code
External Factors
External Factors External Factors
External Factors
Test 1Test 2
@_jon_bell_ESEC/FSE September 4, 2015
Controlled Regression
Testing Assumption
Tests
</>
Code
External Factors
External Factors External Factors
External Factors
Test 1Test 2Test 3
Not sound in practice
@_jon_bell_ESEC/FSE September 4, 2015
Test Dependencies
Test 1 Test 2 Test 3 Test 4Test 1 Test 2
Shared
File
Write, Value “A”
Test 4
Read
Write, Value “B”
Value: B
Test 3
Read
@_jon_bell_ESEC/FSE September 4, 2015
Test Dependencies
Test 1 Test 2 Test 3Test 4
Shared
File
@_jon_bell_ESEC/FSE September 4, 2015
Test Dependencies
Test 1 Test 2 Test 3Test 4Test 1 Test 2 Test 3
Shared
File
Write, Value “A”
Test 4
Write, Value “B”
Read, Expect Value “A”
Value: B
Read
@_jon_bell_ESEC/FSE September 4, 2015
Test Dependencies
Test 1 Test 2 Test 3Test 4Test 1 Test 2 Test 3
Shared
File
Write, Value “A”
Test 4
Write, Value “B”
Read, Expect Value “A”
Value: B
A manifest test dependency
Read
@_jon_bell_ESEC/FSE September 4, 2015
Test Dependencies:
A Clear and Present Danger
• Really exist in practice (Zhang et al. found 96, Luo
et al. found 14)
• Hard to specify - if we could specify, would be safe
to accelerate
• Rarely: isolated (especially not in long building
projects)
• Existing technique to detect: combinatorially run
tests [Zhang, et al ’14]
@_jon_bell_ESEC/FSE September 4, 2015
Brute Force Dependency
Detection
• Looked at feasibility on 10 large open source test
suites
• Exhaustive approach: > 10300 years to find all
dependencies
• Pairwise approach: Average 31,882 executions of the
entire test suite to find (incomplete) dependencies
• Problem: How do we safely accelerate test suites in
the presence of unknown dependencies?
@_jon_bell_ESEC/FSE September 4, 2015
Manifest Test Dependencies
• Definition: a data dependence between tests T1,
T2 that results in the outcome of T2 changing
• All manifest dependencies are data dependencies
• Not all data dependencies are manifest
dependencies
@_jon_bell_ESEC/FSE September 4, 2015
Data Dependencies
Test 1 Test 2 Test 3 Test 4Test 1 Test 2
Shared
File
Write, Value “A”
Test 4
Read
Write, Value “B”
Test 3
Read
Present Dependencies:
Test 1 must run before 2 and 3
Test 4 must run after 2 and 3
Key Insight: Dependencies
don’t need to be precise,
but must be sound
@_jon_bell_ESEC/FSE September 4, 2015
Intuition
Test 1 Test 2 Test 3
Test 8 Test 9 Test 10
Test 15
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
Idle extra capacity
@_jon_bell_ESEC/FSE September 4, 2015
Intuition
Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15
Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13
Test 14
Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15
Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13
Test 14
Idle extra capacity
A lot of dependencies, but still a 2x speedup
@_jon_bell_ESEC/FSE September 4, 2015
ElectricTest - Detecting Data
Dependencies in Java
• Tracks in-memory dependencies (JVMTI plugin)
• Tracks file and network dependencies (IO-Trace agent)
• Implemented entirely within the Oracle or OpenJDK
JVM, no specialized drivers, etc required
• Captures stack traces when dependencies occur to
support debugging
• Generates dependency trees to enable sound test
acceleration
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
After each test, garbage collect; traverse heap to
map objects back to static fields.
Class A
End of test 1
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
After each test, garbage collect; traverse heap to
map objects back to static fields.
Class A
End of test 1
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
After each test, garbage collect; traverse heap to
map objects back to static fields.
Class A
W1
W1
W1
W1
W1
W1
W1
W1
W1
static field
static
field
static
field
staticfield
End of test 1
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
During test execution, monitor accesses to
existing objects
Class A
W1
W1
W1
W1
W1
W1
W1
W1
W1
static field
static
field
static
field
staticfield
During Test 2
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
During test execution, monitor accesses to
existing objects
Class A
W1
W1
W1
W1
W1
W1
W1
W1
W1
static field
static
field
static
field
staticfield
W2
W2 Write!
During Test 2
@_jon_bell_ESEC/FSE September 4, 2015
Identifying Heap
Dependencies
During test execution, monitor accesses to
existing objects
Class A
W1
W1
W1
W1
W1
W1
W1
W1
W1
static field
static
field
static
field
staticfield
W2
W2
W1
Read!
During Test 2
Dependency!
@_jon_bell_ESEC/FSE September 4, 2015
Identifying External
Dependencies
Application
under test
Network
Filesystem
Log remote host address
Log path
ElectricTest enables sound
exploitation of existing test
acceleration techniques
@_jon_bell_ESEC/FSE September 4, 2015
Safe Test Parallelization
Test 1 Test 2 Test 3
Test 8 Test 9 Test 10
Test 15
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13 Test 14
Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7
Test 8 Test 9 Test 10 Test 11 Test 12 Test 13 Test 14
Test 15
@_jon_bell_ESEC/FSE September 4, 2015
Safe Test Parallelization
Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13Test 14
Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15
Test 4 Test 5 Test 6 Test 7
Test 11 Test 12 Test 13Test 14
@_jon_bell_ESEC/FSE September 4, 2015
Safe Test Selection
Test 15
Single test selected to be executed
@_jon_bell_ESEC/FSE September 4, 2015
Safe Test Selection
Test 15Test 1 Test 2 Test 3
Single test selected to be executed with its dependencies
@_jon_bell_ESEC/FSE September 4, 2015
Understanding Dependencies
• What should a developer do about test
dependencies?
• Might be intentional (e.g. cache shared state)
• Might be unintentional but OK (e.g. loggers)
• Might be unintentional and bad (e.g. bug)
@_jon_bell_ESEC/FSE September 4, 2015
Assisting Debugging
Debugging information reported
by the previous technique
Test 3 Test 1
Depends on
@_jon_bell_ESEC/FSE September 4, 2015
Assisting Debugging
Exception*in*thread*"main"*
edu.columbia.cs.psl.testdepends.DependencyException:*Static*Field*
ClassA.FieldA*member*was*previously*written*by*Test*1,*read*here.*
! at!edu.columbia.cs.psl.testdepends.test.Example$NestedExample.dragons(Example.java:20)!
! at!edu.columbia.cs.psl.testdepends.test.Example.moreMagic(Example.java:12)!
! at!edu.columbia.cs.psl.testdepends.test.Example.magic(Example.java:8)!
! at!edu.columbia.cs.psl.testdepends.test.Example.main(Example.java:15)!
Test that wrote value
Stack trace shows use
Value that is read
@_jon_bell_ESEC/FSE September 4, 2015
Evaluation
• RQ1: Recall (accuracy)
• RQ2: Runtime overhead
• RQ3: Impact on acceleration
@_jon_bell_ESEC/FSE September 4, 2015
RQ1: Recall
Project
Joda
XMLSecurity
Crystal
Synoptic
Dependencies Detected
Ground
Truth
Ground
Truth
2
4
18
1
ElectricTest
Writers
15
3
15
10
Readers
121
103
39
117
@_jon_bell_ESEC/FSE September 4, 2015
RQ1: Recall
Project
Joda
XMLSecurity
Crystal
Synoptic
Dependencies Detected
Ground
Truth
Ground
Truth
2
4
18
1
ElectricTest
Writers
15
3
15
10
Readers
121
103
39
117
ElectricTest Shared
Resource Locations
App
39
3
4
3
Library
12
15
19
14
@_jon_bell_ESEC/FSE September 4, 2015
RQ2: Overhead
• Selected 10 projects with > 10 minutes of tests
• Also included projects studied by Zhang et al,
averaging < 10 seconds of testing
• Previous exhaustive approach slowdown: >10300X
• Previous heuristic approach slowdown: 31,882X
• ElectricTest slowdown: 36X (885X faster than
previous approach)
@_jon_bell_ESEC/FSE September 4, 2015
0X 1,000X 2,000X 3,000X 4,000X 5,000X 6,000X 7,000X 8,000X 9,000X 10,000X
mongo%java%driver-
tachyon-
spring%data%mongodb-
xml-security-
ne8y-
je8y.project-
crystal-
crunch-
camel-
:tan-
synop:c-
hazelcast-
mule-
joda%:me-
ElectricTest Slowdown Pairwise Slowdown
*418,000X
RQ2: Overhead
On average, ElectricTest is 885X faster than
running all tests pairwise
Slowdown relative to a single test suite execution (lower is better)
@_jon_bell_ESEC/FSE September 4, 2015
0X 50X 100X 150X 200X 250X 300X
mongo%java%driver-
tachyon-
spring%data%mongodb-
xml-security-
ne8y-
je8y.project-
crystal-
crunch-
camel-
:tan-
synop:c-
hazelcast-
mule-
joda%:me-
RQ2: Overhead
Average 36X
A lot of fast running tests:
Runtime dominated by pauses
between tests (gc)
Slowdown relative to a single test suite execution (lower is better)
@_jon_bell_ESEC/FSE September 4, 2015
0X 5X 10X 15X 20X 25X 30X
camel&
crunch&
hazelcast&
je/y.project&
mongo5java5driver&
mule&
ne/y&
spring5data5mongodb&
tachyon&
:tan&
Safe Unsafe
Speedup (higher is better)
RQ3: Impact on Acceleration
Average (Unsafe) 19x
Average (Safe) 7x
@_jon_bell_ESEC/FSE September 4, 2015
@_jon_bell_ESEC/FSE September 4, 2015
Efficient Dependency
Detection for Safe Java
Test Acceleration
Jonathan Bell, Gail Kaiser, Eric Melski and Mohan Dattatreya
Columbia University & Electric Cloud, Inc

More Related Content

What's hot

Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Developmentsatya sudheer
 
QUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeQUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeMasud Rahman
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 
Agile analysis development
Agile analysis developmentAgile analysis development
Agile analysis developmentsetitesuk
 
Entaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case StudyEntaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case StudyElisabeth Hendrickson
 
Hack in Paris - Agnitio
Hack in Paris - AgnitioHack in Paris - Agnitio
Hack in Paris - AgnitioSecurity Ninja
 
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly DavidoffDevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly DavidoffDevSecCon
 
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Raffi Khatchadourian
 
Static Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin CollinsStatic Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin CollinsSonatype
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentDhaval Dalal
 
Php com con-2011
Php com con-2011Php com con-2011
Php com con-2011LB Denker
 
Seeding a Tree in a Gherkin
Seeding a Tree in a GherkinSeeding a Tree in a Gherkin
Seeding a Tree in a GherkinPaul Rohorzka
 
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya Janca
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya JancaDevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya Janca
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya JancaDevSecCon
 

What's hot (14)

Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Development
 
QUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-SingaporeQUICKAR-ASE2016-Singapore
QUICKAR-ASE2016-Singapore
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 
Agile analysis development
Agile analysis developmentAgile analysis development
Agile analysis development
 
Entaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case StudyEntaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case Study
 
Hack in Paris - Agnitio
Hack in Paris - AgnitioHack in Paris - Agnitio
Hack in Paris - Agnitio
 
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly DavidoffDevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
 
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
 
Static Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin CollinsStatic Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin Collins
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Php com con-2011
Php com con-2011Php com con-2011
Php com con-2011
 
Agile Testing Overview
Agile Testing OverviewAgile Testing Overview
Agile Testing Overview
 
Seeding a Tree in a Gherkin
Seeding a Tree in a GherkinSeeding a Tree in a Gherkin
Seeding a Tree in a Gherkin
 
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya Janca
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya JancaDevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya Janca
DevSecCon Tel Aviv 2018 - Security learns to sprint by Tanya Janca
 

Similar to Efficient Dependency Detection for Safe Java Test Acceleration

Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and younelinger
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easierChristian Hujer
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven TestingMaveryx
 
Get Involved Early: A Tester’s Experience with Requirements
Get Involved Early: A Tester’s Experience with RequirementsGet Involved Early: A Tester’s Experience with Requirements
Get Involved Early: A Tester’s Experience with RequirementsTechWell
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsSteven Li
 
Data Driven Framework in Selenium
Data Driven Framework in SeleniumData Driven Framework in Selenium
Data Driven Framework in SeleniumKnoldus Inc.
 
Exploratory Testing: Make It Part of Your Test Strategy
Exploratory Testing: Make It Part of Your Test StrategyExploratory Testing: Make It Part of Your Test Strategy
Exploratory Testing: Make It Part of Your Test StrategyTechWell
 
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't SuckDeliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't SuckKevin Brockhoff
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsJoEllen Carter
 
Workshop agile testing
Workshop agile testingWorkshop agile testing
Workshop agile testingJohn Marx
 
Unit Tests are Overrated (NDCOslo 2013)
Unit Tests are Overrated (NDCOslo 2013)Unit Tests are Overrated (NDCOslo 2013)
Unit Tests are Overrated (NDCOslo 2013)Lars-Erik Kindblad
 
Managing Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal ApproachManaging Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal ApproachTechWell
 
Agile Test Management and Reporting—Even in a Non-Agile Project
Agile Test Management and Reporting—Even in a Non-Agile ProjectAgile Test Management and Reporting—Even in a Non-Agile Project
Agile Test Management and Reporting—Even in a Non-Agile ProjectTechWell
 
End to end testing - strategies
End to end testing - strategiesEnd to end testing - strategies
End to end testing - strategiesanuvip
 

Similar to Efficient Dependency Detection for Safe Java Test Acceleration (20)

Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
 
Test Dependencies and the Future of Build Acceleration
Test Dependencies and the Future of Build AccelerationTest Dependencies and the Future of Build Acceleration
Test Dependencies and the Future of Build Acceleration
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
 
Get Involved Early: A Tester’s Experience with Requirements
Get Involved Early: A Tester’s Experience with RequirementsGet Involved Early: A Tester’s Experience with Requirements
Get Involved Early: A Tester’s Experience with Requirements
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
 
Data Driven Framework in Selenium
Data Driven Framework in SeleniumData Driven Framework in Selenium
Data Driven Framework in Selenium
 
Test NG Framework Complete Walk Through
Test NG Framework Complete Walk ThroughTest NG Framework Complete Walk Through
Test NG Framework Complete Walk Through
 
Exploratory Testing: Make It Part of Your Test Strategy
Exploratory Testing: Make It Part of Your Test StrategyExploratory Testing: Make It Part of Your Test Strategy
Exploratory Testing: Make It Part of Your Test Strategy
 
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't SuckDeliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing Fundamentals
 
Workshop agile testing
Workshop agile testingWorkshop agile testing
Workshop agile testing
 
Exploratory testing
Exploratory testingExploratory testing
Exploratory testing
 
Unit Tests are Overrated (NDCOslo 2013)
Unit Tests are Overrated (NDCOslo 2013)Unit Tests are Overrated (NDCOslo 2013)
Unit Tests are Overrated (NDCOslo 2013)
 
Managing Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal ApproachManaging Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal Approach
 
Testing smells
Testing smellsTesting smells
Testing smells
 
Agile Test Management and Reporting—Even in a Non-Agile Project
Agile Test Management and Reporting—Even in a Non-Agile ProjectAgile Test Management and Reporting—Even in a Non-Agile Project
Agile Test Management and Reporting—Even in a Non-Agile Project
 
End to end testing - strategies
End to end testing - strategiesEnd to end testing - strategies
End to end testing - strategies
 

More from jon_bell

Replay without Recording of Production Bugs for Service Oriented Applications
Replay without Recording of Production Bugs for Service Oriented ApplicationsReplay without Recording of Production Bugs for Service Oriented Applications
Replay without Recording of Production Bugs for Service Oriented Applicationsjon_bell
 
A Large-Scale Study of Test Coverage Evolution
A Large-Scale Study of Test Coverage EvolutionA Large-Scale Study of Test Coverage Evolution
A Large-Scale Study of Test Coverage Evolutionjon_bell
 
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)jon_bell
 
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMs
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMsPhosphor: Illuminating Dynamic Data Flow in Commodity JVMs
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMsjon_bell
 
Unit Test Virtualization: Optimizing Testing Time
Unit Test Virtualization: Optimizing Testing TimeUnit Test Virtualization: Optimizing Testing Time
Unit Test Virtualization: Optimizing Testing Timejon_bell
 
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...jon_bell
 
A Large-Scale, Longitudinal Study of User Profiles in World of Warcraft
A Large-Scale, Longitudinal Study of User Profiles in World of WarcraftA Large-Scale, Longitudinal Study of User Profiles in World of Warcraft
A Large-Scale, Longitudinal Study of User Profiles in World of Warcraftjon_bell
 

More from jon_bell (7)

Replay without Recording of Production Bugs for Service Oriented Applications
Replay without Recording of Production Bugs for Service Oriented ApplicationsReplay without Recording of Production Bugs for Service Oriented Applications
Replay without Recording of Production Bugs for Service Oriented Applications
 
A Large-Scale Study of Test Coverage Evolution
A Large-Scale Study of Test Coverage EvolutionA Large-Scale Study of Test Coverage Evolution
A Large-Scale Study of Test Coverage Evolution
 
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
 
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMs
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMsPhosphor: Illuminating Dynamic Data Flow in Commodity JVMs
Phosphor: Illuminating Dynamic Data Flow in Commodity JVMs
 
Unit Test Virtualization: Optimizing Testing Time
Unit Test Virtualization: Optimizing Testing TimeUnit Test Virtualization: Optimizing Testing Time
Unit Test Virtualization: Optimizing Testing Time
 
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...
Chronicler: Lightweight Recording to Reproduce Field Failures (Presented at I...
 
A Large-Scale, Longitudinal Study of User Profiles in World of Warcraft
A Large-Scale, Longitudinal Study of User Profiles in World of WarcraftA Large-Scale, Longitudinal Study of User Profiles in World of Warcraft
A Large-Scale, Longitudinal Study of User Profiles in World of Warcraft
 

Recently uploaded

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Efficient Dependency Detection for Safe Java Test Acceleration

  • 1. @_jon_bell_ESEC/FSE September 4, 2015 Efficient Dependency Detection for Safe Java Test Acceleration Jonathan Bell, Gail Kaiser, Eric Melski and Mohan Dattatreya Columbia University & Electric Cloud, Inc
  • 2. @_jon_bell_ESEC/FSE September 4, 2015 Simplified Software Lifecycle Make changes to code Build & test Commit How long is too long of a build? 1 day? 6 hours? 10 minutes?
  • 3. @_jon_bell_ESEC/FSE September 4, 2015 Simplified Software Lifecycle • Compile sources • Generate documentation • Run tests • Package Make changes to code Build & test Commit
  • 4. @_jon_bell_ESEC/FSE September 4, 2015 Testing Dominates Build Times 20% 38% 41% 351 projects from GitHub Testing Other Compiling
  • 5. @_jon_bell_ESEC/FSE September 4, 2015 Testing Dominates Build Times 14% 26% 60% Projects taking > 10 minutes to build (69) Testing Other Compiling
  • 6. @_jon_bell_ESEC/FSE September 4, 2015 Testing Dominates Build Times 2%8% 90% Projects taking > 1 hour to build (8) Testing OtherCompiling
  • 7. Faster tests = Faster builds
  • 9. @_jon_bell_ESEC/FSE September 4, 2015 Regression Test Selection Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 Gligoric et al. [ISSTA ’15], Orso et al. [FSE ’04], Harrold et al. [OOPSLA ’01] Changeset
  • 10. @_jon_bell_ESEC/FSE September 4, 2015 Regression Test Selection Test 1 Test 3 Test 8 Test 4 Gligoric et al. [ISSTA ’15], Orso et al. [FSE ’04], Harrold et al. [OOPSLA ’01] Changeset Tests not relevant to changeset: skipped
  • 11. @_jon_bell_ESEC/FSE September 4, 2015 Test Suite Minimization Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 < /> Code Hao et al. [ICSE ’12]; Orso et al. [ICSE ’09]; Jeffrey et al. [TSE ’07]; Tallam et al. [PASTE ’05]; Jones et al. [TOSEM ’03]; Harrold et al. [TOSEM ’93]; Chen et al. [IST ’98]; Wong et al. [ICSE ’95] and more
  • 12. @_jon_bell_ESEC/FSE September 4, 2015 Test Suite Minimization Test 3 Test 8 Test 9 Test 10 Test 4 Test 5 Test 6 Test 7 Test 11 Test 13 Test 14 < /> Code Hao et al. [ICSE ’12]; Orso et al. [ICSE ’09]; Jeffrey et al. [TSE ’07]; Tallam et al. [PASTE ’05]; Jones et al. [TOSEM ’03]; Harrold et al. [TOSEM ’93]; Chen et al. [IST ’98]; Wong et al. [ICSE ’95] and more Redundant tests: removed
  • 13. @_jon_bell_ESEC/FSE September 4, 2015 Test Parallelization Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14
  • 14. @_jon_bell_ESEC/FSE September 4, 2015 Test Parallelization Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14
  • 15. @_jon_bell_ESEC/FSE September 4, 2015 Controlled Regression Testing Assumption Tests </> Code
  • 16. @_jon_bell_ESEC/FSE September 4, 2015 Controlled Regression Testing Assumption Tests </> Code External Factors External Factors External Factors External Factors
  • 17. @_jon_bell_ESEC/FSE September 4, 2015 Controlled Regression Testing Assumption Tests </> Code External Factors External Factors External Factors External Factors Test 1
  • 18. @_jon_bell_ESEC/FSE September 4, 2015 Controlled Regression Testing Assumption Tests </> Code External Factors External Factors External Factors External Factors Test 1Test 2
  • 19. @_jon_bell_ESEC/FSE September 4, 2015 Controlled Regression Testing Assumption Tests </> Code External Factors External Factors External Factors External Factors Test 1Test 2Test 3
  • 20. Not sound in practice
  • 21. @_jon_bell_ESEC/FSE September 4, 2015 Test Dependencies Test 1 Test 2 Test 3 Test 4Test 1 Test 2 Shared File Write, Value “A” Test 4 Read Write, Value “B” Value: B Test 3 Read
  • 22. @_jon_bell_ESEC/FSE September 4, 2015 Test Dependencies Test 1 Test 2 Test 3Test 4 Shared File
  • 23. @_jon_bell_ESEC/FSE September 4, 2015 Test Dependencies Test 1 Test 2 Test 3Test 4Test 1 Test 2 Test 3 Shared File Write, Value “A” Test 4 Write, Value “B” Read, Expect Value “A” Value: B Read
  • 24. @_jon_bell_ESEC/FSE September 4, 2015 Test Dependencies Test 1 Test 2 Test 3Test 4Test 1 Test 2 Test 3 Shared File Write, Value “A” Test 4 Write, Value “B” Read, Expect Value “A” Value: B A manifest test dependency Read
  • 25. @_jon_bell_ESEC/FSE September 4, 2015 Test Dependencies: A Clear and Present Danger • Really exist in practice (Zhang et al. found 96, Luo et al. found 14) • Hard to specify - if we could specify, would be safe to accelerate • Rarely: isolated (especially not in long building projects) • Existing technique to detect: combinatorially run tests [Zhang, et al ’14]
  • 26. @_jon_bell_ESEC/FSE September 4, 2015 Brute Force Dependency Detection • Looked at feasibility on 10 large open source test suites • Exhaustive approach: > 10300 years to find all dependencies • Pairwise approach: Average 31,882 executions of the entire test suite to find (incomplete) dependencies • Problem: How do we safely accelerate test suites in the presence of unknown dependencies?
  • 27. @_jon_bell_ESEC/FSE September 4, 2015 Manifest Test Dependencies • Definition: a data dependence between tests T1, T2 that results in the outcome of T2 changing • All manifest dependencies are data dependencies • Not all data dependencies are manifest dependencies
  • 28. @_jon_bell_ESEC/FSE September 4, 2015 Data Dependencies Test 1 Test 2 Test 3 Test 4Test 1 Test 2 Shared File Write, Value “A” Test 4 Read Write, Value “B” Test 3 Read Present Dependencies: Test 1 must run before 2 and 3 Test 4 must run after 2 and 3
  • 29. Key Insight: Dependencies don’t need to be precise, but must be sound
  • 30. @_jon_bell_ESEC/FSE September 4, 2015 Intuition Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 Idle extra capacity
  • 31. @_jon_bell_ESEC/FSE September 4, 2015 Intuition Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 Idle extra capacity A lot of dependencies, but still a 2x speedup
  • 32. @_jon_bell_ESEC/FSE September 4, 2015 ElectricTest - Detecting Data Dependencies in Java • Tracks in-memory dependencies (JVMTI plugin) • Tracks file and network dependencies (IO-Trace agent) • Implemented entirely within the Oracle or OpenJDK JVM, no specialized drivers, etc required • Captures stack traces when dependencies occur to support debugging • Generates dependency trees to enable sound test acceleration
  • 33. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies After each test, garbage collect; traverse heap to map objects back to static fields. Class A End of test 1
  • 34. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies After each test, garbage collect; traverse heap to map objects back to static fields. Class A End of test 1
  • 35. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies After each test, garbage collect; traverse heap to map objects back to static fields. Class A W1 W1 W1 W1 W1 W1 W1 W1 W1 static field static field static field staticfield End of test 1
  • 36. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies During test execution, monitor accesses to existing objects Class A W1 W1 W1 W1 W1 W1 W1 W1 W1 static field static field static field staticfield During Test 2
  • 37. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies During test execution, monitor accesses to existing objects Class A W1 W1 W1 W1 W1 W1 W1 W1 W1 static field static field static field staticfield W2 W2 Write! During Test 2
  • 38. @_jon_bell_ESEC/FSE September 4, 2015 Identifying Heap Dependencies During test execution, monitor accesses to existing objects Class A W1 W1 W1 W1 W1 W1 W1 W1 W1 static field static field static field staticfield W2 W2 W1 Read! During Test 2 Dependency!
  • 39. @_jon_bell_ESEC/FSE September 4, 2015 Identifying External Dependencies Application under test Network Filesystem Log remote host address Log path
  • 40. ElectricTest enables sound exploitation of existing test acceleration techniques
  • 41. @_jon_bell_ESEC/FSE September 4, 2015 Safe Test Parallelization Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13 Test 14 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7 Test 8 Test 9 Test 10 Test 11 Test 12 Test 13 Test 14 Test 15
  • 42. @_jon_bell_ESEC/FSE September 4, 2015 Safe Test Parallelization Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13Test 14 Test 1 Test 2 Test 3 Test 8 Test 9 Test 10 Test 15 Test 4 Test 5 Test 6 Test 7 Test 11 Test 12 Test 13Test 14
  • 43. @_jon_bell_ESEC/FSE September 4, 2015 Safe Test Selection Test 15 Single test selected to be executed
  • 44. @_jon_bell_ESEC/FSE September 4, 2015 Safe Test Selection Test 15Test 1 Test 2 Test 3 Single test selected to be executed with its dependencies
  • 45. @_jon_bell_ESEC/FSE September 4, 2015 Understanding Dependencies • What should a developer do about test dependencies? • Might be intentional (e.g. cache shared state) • Might be unintentional but OK (e.g. loggers) • Might be unintentional and bad (e.g. bug)
  • 46. @_jon_bell_ESEC/FSE September 4, 2015 Assisting Debugging Debugging information reported by the previous technique Test 3 Test 1 Depends on
  • 47. @_jon_bell_ESEC/FSE September 4, 2015 Assisting Debugging Exception*in*thread*"main"* edu.columbia.cs.psl.testdepends.DependencyException:*Static*Field* ClassA.FieldA*member*was*previously*written*by*Test*1,*read*here.* ! at!edu.columbia.cs.psl.testdepends.test.Example$NestedExample.dragons(Example.java:20)! ! at!edu.columbia.cs.psl.testdepends.test.Example.moreMagic(Example.java:12)! ! at!edu.columbia.cs.psl.testdepends.test.Example.magic(Example.java:8)! ! at!edu.columbia.cs.psl.testdepends.test.Example.main(Example.java:15)! Test that wrote value Stack trace shows use Value that is read
  • 48. @_jon_bell_ESEC/FSE September 4, 2015 Evaluation • RQ1: Recall (accuracy) • RQ2: Runtime overhead • RQ3: Impact on acceleration
  • 49. @_jon_bell_ESEC/FSE September 4, 2015 RQ1: Recall Project Joda XMLSecurity Crystal Synoptic Dependencies Detected Ground Truth Ground Truth 2 4 18 1 ElectricTest Writers 15 3 15 10 Readers 121 103 39 117
  • 50. @_jon_bell_ESEC/FSE September 4, 2015 RQ1: Recall Project Joda XMLSecurity Crystal Synoptic Dependencies Detected Ground Truth Ground Truth 2 4 18 1 ElectricTest Writers 15 3 15 10 Readers 121 103 39 117 ElectricTest Shared Resource Locations App 39 3 4 3 Library 12 15 19 14
  • 51. @_jon_bell_ESEC/FSE September 4, 2015 RQ2: Overhead • Selected 10 projects with > 10 minutes of tests • Also included projects studied by Zhang et al, averaging < 10 seconds of testing • Previous exhaustive approach slowdown: >10300X • Previous heuristic approach slowdown: 31,882X • ElectricTest slowdown: 36X (885X faster than previous approach)
  • 52. @_jon_bell_ESEC/FSE September 4, 2015 0X 1,000X 2,000X 3,000X 4,000X 5,000X 6,000X 7,000X 8,000X 9,000X 10,000X mongo%java%driver- tachyon- spring%data%mongodb- xml-security- ne8y- je8y.project- crystal- crunch- camel- :tan- synop:c- hazelcast- mule- joda%:me- ElectricTest Slowdown Pairwise Slowdown *418,000X RQ2: Overhead On average, ElectricTest is 885X faster than running all tests pairwise Slowdown relative to a single test suite execution (lower is better)
  • 53. @_jon_bell_ESEC/FSE September 4, 2015 0X 50X 100X 150X 200X 250X 300X mongo%java%driver- tachyon- spring%data%mongodb- xml-security- ne8y- je8y.project- crystal- crunch- camel- :tan- synop:c- hazelcast- mule- joda%:me- RQ2: Overhead Average 36X A lot of fast running tests: Runtime dominated by pauses between tests (gc) Slowdown relative to a single test suite execution (lower is better)
  • 54. @_jon_bell_ESEC/FSE September 4, 2015 0X 5X 10X 15X 20X 25X 30X camel& crunch& hazelcast& je/y.project& mongo5java5driver& mule& ne/y& spring5data5mongodb& tachyon& :tan& Safe Unsafe Speedup (higher is better) RQ3: Impact on Acceleration Average (Unsafe) 19x Average (Safe) 7x
  • 56. @_jon_bell_ESEC/FSE September 4, 2015 Efficient Dependency Detection for Safe Java Test Acceleration Jonathan Bell, Gail Kaiser, Eric Melski and Mohan Dattatreya Columbia University & Electric Cloud, Inc