SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Budapest University of Technology and Economics
Department of Measurement and Information Systems
Budapest University of Technology and Economics
Fault Tolerant Systems Research Group
White-box Unit Test Generation
with Microsoft IntelliTest
Dávid Honfi
1
Focus
2
module B
module C
service
Unit testing
module A
Code-based
(White-box)
White-box test design
public int M1(int a, int b)
{
if(a == 0)
{
Console.WriteLine(ERROR_MSG);
return -1;
}
if(b > a) return b*a+5;
else return (a+b)/2;
}
Let’s cover all
the statements!
a==0
a!=0 && b>a
a!=0 && b<=a
a==0 a!=0 && b<=a a!=0 & b>a
a 0 1 2
b 0 0 3
What’s missing?
 Usually encoding observed outputs
 Where can it be employed?
oBasic, common bugs (e.g., uncaught exceptions)
oViolation of assertions or contracts
oDeviations from existing outputs (regression)
 Automation with code exploration
test case = input + expected output
Symbolic execution: the idea
 Static program analysis technique from the ’70s
 Application for test generation
o Symbolic variables instead of normal ones
o Constraints forming for each path with symb. variables
o Constraint solving (e.g., SMT solver)
o A solution yields an input to execute a given path
 New century, new progress:
o Enough computing power (e.g., for SMT solvers)
o New ideas, extensions, algorithms and tools
5
Existing tools using symbolic execution
 .NET: Microsoft IntelliTest (a.k.a. Pex)
 x86 binary: Microsoft SAGE
 Java
oNASA Symbolic PathFinder
oCATG
o…
 JavaScript: Jalangi
 C: KLEE
IntelliTest
Microsoft
DEMO 1.
The basic use of IntelliTest
public int M1(int a, int b)
{
if(a == 0)
{
Console.WriteLine(ERROR_MSG);
return -1;
}
if(b > a) return b*a+5;
else return (a+b)/2;
}
Details of IntelliTest (Dynamic SE)
Source code
Concrete
input values
Symbolic
variables
Constraint
solver
Constraints
Concrete
execution
Symbolic
execution
a==0
a:=0
b:=0 a,b
Transformationa!=0
a:=1
b:=0
public int M1(int a, int b)
{
if(a == 0)
{
Console.WriteLine(ERROR_MSG);
return -1;
}
if(b > a) return b*a+5;
else return (a+b)/2;
}
Details of IntelliTest (Dynamic SE)
Source code
Concrete
input values
Symbolic
variables
Constraint
solver
Constraints
Concrete
execution
Symbolic
execution
a!=0 &&
b<=a
a!=0 && b>a
a:=1
b:=0
a:=2
b:=3
Parameterized Unit Testing
 Idea: Using test methods as specifications
o Easy to understand, easy to check, etc.
o But: too specific (used for a code unit), verbose, etc.
 Parameterized Unit Test (PUT)
o Wrapper method for method/unit under test
o Main elements
• Inputs of the unit
• Assumptions for input space restriction
• Call to the unit
• Assertions for expected results
o Serves as a specification  Test generators can use it
11
Example: Parameterized Unit Testing
12
void ReduceQuantityPUT(Product prod, int soldCount) {
// Assumptions
Assume.IsTrue(prod != null && prod.Quantity > 0);
Assume.IsTrue(soldCount > 0);
int oldQuantity = prod.Quantity;
// Calling the UUT
int newQuantity = StorageManager.ReduceQuantity(prod,soldCount);
// Assertions
Assert.IsTrue(newQuantity >= 0);
Assert.IsTrue(newQuantity < oldQuantity);
}
/// The method reduces the quantity of the specified
/// product. The product is known to be NOT null with
/// quantity larger than 0, also the sold amount is
/// always more than zero. The method has effects on
/// the database, and returns the new quantity of the
/// product. If the quantity would be negative, the
/// method reduces the quantity to zero.
int ReduceQuantity(Product prod, int soldCount) { … }
Example: Parameterized Unit Testing
13
void ReduceQuantityPUT(Product prod, int soldCount) {
// Assumptions
Assume.IsTrue(prod != null && prod.Quantity > 0);
Assume.IsTrue(soldCount > 0);
int oldQuantity = prod.Quantity;
// Calling the UUT
int newQuantity = StorageManager.ReduceQuantity(prod,soldCount);
// Assertions
Assert.IsTrue(newQuantity >= 0);
Assert.IsTrue(newQuantity < oldQuantity);
}
/// The method reduces the quantity of the specified
/// product. The product is known to be NOT null with
/// quantity larger than 0, also the sold amount is
/// always more than zero. The method has effects on
/// the database, and returns the new quantity of the
/// product. If the quantity would be negative, the
/// method reduces the quantity to zero.
int ReduceQuantity(Product prod, int soldCount) { … }
DEMO 2.
Parameterized Unit Testing with IntelliTest
Challenges of SE-based techniques
1. Exponential growth of execution paths
2. Complex arithmetic expressions
3. Floating point operations
4. Compound structures and objects
5. Pointer operations
6. Interaction with the environment
7. Multithreading
8. …
15
T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”.
Future Generation Computer Systems, 29(7), 2013
Challenges of SE-based techniques
1. Exponential growth of execution paths
2. Complex arithmetic expressions
3. Floating point operations
4. Compound structures and objects
5. Pointer operations
6. Interaction with the environment
7. Multithreading
8. …
16
T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”.
Future Generation Computer Systems, 29(7), 2013
SEViz
Visualizing symbolic execution
 SEViz: Symbolic Execution VIsualiZer
 Goal: Help identifying test generation problems
o Long execution paths
o Unsolvable constraints
o …
 Solution: Symbolic execution tree with metadata
17
Mapping to
source code
Calls to constraint solver
1
No Yes
End of execution paths
No test Failed test Passed test
1 11 1 1 1
SHAPE BORDER COLOR
Visualizing symbolic execution
 Additional metadata
o Sequence number
o Path condition
o Incremental path condition (based on parent)
o Status: can have siblings or not
o Source code mapping (if available)
18
DEMO 3.
Visualizing test generation with SEViz
Challenges of SE-based techniques
1. Exponential growth of execution paths
2. Complex arithmetic expressions
3. Floating point operations
4. Compound structures and objects
5. Pointer operations
6. Interaction with the environment
7. Multithreading
8. …
20
T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”.
Future Generation Computer Systems, 29(7), 2013
SEViz
Automated
isolation
Existing solutions
 Stubbing and mocking (faking)
o Fixed values and checks for all DSE executions
o Not suitable for test generation
 Parameterized mocking
o Interaction with DSE is possible
• More relevant test cases
• Custom behavior in mocks: e.g., state change of objects
o Introduces complexity for users of DSE
• Requires large amount of time and effort
• Not trivial task in case of complex structures
o Fakes cannot be generated under certain conditions
21
Approach for automated isolation
 Automated isolation on source code level
1. Abstract syntax tree transformations in the SUT
2. Parameterized sandbox synthesization
22
SUT
C1
C2
Environment
i(C1,C2)
i(C2,E)
i(C2,C1)
i(C1,E)
SUT
C1’ C2’
Environment
SB i'(C2,E)i'(C1,E)
i(C2,C1)
i(C1,C2)
Replaced
external
objects
Replaced
external
calls
Sandbox
Example of AST transformation
23
public class WeekendNotifier {
public bool IsWeekendNear() {
DateTime date = DateTime.GetNow();
date.AddDays(2);
if(date.GetDay() == "Saturday") return true;
return false;
}
}
public class WeekendNotifier {
public bool IsWeekendNear() {
DynamicFake date = Fake.DateTimeGetNow();
Fake.DateTimeAddDays(2,date);
if(Fake.DateTimeGetDay(date) == "Saturday") return true;
return false;
}
}
Example of parameterized sandbox
24
public static class Fake {
public DynamicFake DateTimeGetNow() {
// Return a state container object instead of the original
return new DynamicFake();
}
public void DateTimeAddDays(int days, DynamicFake date) {
// TODO: State change of date using DSE
}
public int DateTimeGetDay(DynamicFake date) {
// Obtaining return value from DSE
return DSEEngine.ChooseValue<int>();
}
}
Summary
 White-box test generation: symbolic execution
 IntelliTest, a state-of-the-art test generator
o Dynamic Symbolic Execution (DSE)
o Parameterized Unit Tests
 DSE has several challenges, e.g.:
o Test generation problem indentification
o Environment dependencies
 My research
o SEViz: A tool for visualizing symbolic execution
o Automated isolation with source code transformation
25
Resources
 IntelliTest
https://www.visualstudio.com/en-
us/docs/test/developer-testing/intellitest-manual
https://www.codehunt.com/
 SEViz [ICST’15 Tool Paper]
https://ftsrg.github.io/seviz
 Automated isolation
https://pp.bme.hu/eecs/article/view/9768
26

Weitere ähnliche Inhalte

Was ist angesagt?

Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerPlatonov Sergey
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеPlatonov Sergey
 
Accelerating Habanero-Java Program with OpenCL Generation
Accelerating Habanero-Java Program with OpenCL GenerationAccelerating Habanero-Java Program with OpenCL Generation
Accelerating Habanero-Java Program with OpenCL GenerationAkihiro Hayashi
 
Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Intel® Software
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Juan Pablo
 
12. Java Exceptions and error handling
12. Java Exceptions and error handling12. Java Exceptions and error handling
12. Java Exceptions and error handlingIntro C# Book
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011devCAT Studio, NEXON
 
Checking Intel IPP Samples for Windows - Continuation
Checking Intel IPP Samples for Windows - ContinuationChecking Intel IPP Samples for Windows - Continuation
Checking Intel IPP Samples for Windows - ContinuationPVS-Studio
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNoSuchCon
 
Java language fundamentals
Java language fundamentalsJava language fundamentals
Java language fundamentalsKapish Joshi
 
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiCysinfo Cyber Security Community
 
Junit, mockito, etc
Junit, mockito, etcJunit, mockito, etc
Junit, mockito, etcYaron Karni
 
The art of reverse engineering flash exploits
The art of reverse engineering flash exploitsThe art of reverse engineering flash exploits
The art of reverse engineering flash exploitsPriyanka Aash
 
20171127 當julia遇上資料科學
20171127 當julia遇上資料科學20171127 當julia遇上資料科學
20171127 當julia遇上資料科學岳華 杜
 
MuVM: Higher Order Mutation Analysis Virtual Machine for C
MuVM: Higher Order Mutation Analysis Virtual Machine for CMuVM: Higher Order Mutation Analysis Virtual Machine for C
MuVM: Higher Order Mutation Analysis Virtual Machine for CSusumu Tokumoto
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database TestingChris Oldwood
 

Was ist angesagt? (20)

Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory Sanitizer
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемые
 
Accelerating Habanero-Java Program with OpenCL Generation
Accelerating Habanero-Java Program with OpenCL GenerationAccelerating Habanero-Java Program with OpenCL Generation
Accelerating Habanero-Java Program with OpenCL Generation
 
Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*Tools and Techniques for Understanding Threading Behavior in Android*
Tools and Techniques for Understanding Threading Behavior in Android*
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
12. Java Exceptions and error handling
12. Java Exceptions and error handling12. Java Exceptions and error handling
12. Java Exceptions and error handling
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011
 
Checking Intel IPP Samples for Windows - Continuation
Checking Intel IPP Samples for Windows - ContinuationChecking Intel IPP Samples for Windows - Continuation
Checking Intel IPP Samples for Windows - Continuation
 
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly AdviceNSC #2 - D2 06 - Richard Johnson - SAGEly Advice
NSC #2 - D2 06 - Richard Johnson - SAGEly Advice
 
Mutation @ Spotify
Mutation @ Spotify Mutation @ Spotify
Mutation @ Spotify
 
Java language fundamentals
Java language fundamentalsJava language fundamentals
Java language fundamentals
 
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
 
Junit, mockito, etc
Junit, mockito, etcJunit, mockito, etc
Junit, mockito, etc
 
The art of reverse engineering flash exploits
The art of reverse engineering flash exploitsThe art of reverse engineering flash exploits
The art of reverse engineering flash exploits
 
Grasping dataset
Grasping datasetGrasping dataset
Grasping dataset
 
Java Inheritance
Java InheritanceJava Inheritance
Java Inheritance
 
20171127 當julia遇上資料科學
20171127 當julia遇上資料科學20171127 當julia遇上資料科學
20171127 當julia遇上資料科學
 
MuVM: Higher Order Mutation Analysis Virtual Machine for C
MuVM: Higher Order Mutation Analysis Virtual Machine for CMuVM: Higher Order Mutation Analysis Virtual Machine for C
MuVM: Higher Order Mutation Analysis Virtual Machine for C
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database Testing
 
Java Basics - Part2
Java Basics - Part2Java Basics - Part2
Java Basics - Part2
 

Andere mochten auch

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...Sencha
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...Sencha
 

Andere mochten auch (6)

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
test generation
test generationtest generation
test generation
 
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
SenchaCon 2016: How Sencha Test Helps Automate Functional Testing of Ext JS M...
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
Brazil Startup Report
Brazil Startup ReportBrazil Startup Report
Brazil Startup Report
 

Ähnlich wie White-box Unit Test Generation with Microsoft IntelliTest

Mutation testing for a safer Future
Mutation testing for a safer FutureMutation testing for a safer Future
Mutation testing for a safer FutureCocoaHeads France
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testingdn
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testingmalcolmt
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)Maurício Aniche
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3AtakanAral
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.Bert Brouns
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerAndrey Karpov
 
Scaffolding with JMock
Scaffolding with JMockScaffolding with JMock
Scaffolding with JMockValerio Maggio
 
A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)Thierry Gayet
 
Google test training
Google test trainingGoogle test training
Google test trainingThierry Gayet
 
Google mock training
Google mock trainingGoogle mock training
Google mock trainingThierry Gayet
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareAndrey Karpov
 
31b - JUnit and Mockito.pdf
31b - JUnit and Mockito.pdf31b - JUnit and Mockito.pdf
31b - JUnit and Mockito.pdfgauravavam
 
How to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindHow to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindAndreas Czakaj
 
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMEREVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMERAndrey Karpov
 
Static analysis: Around Java in 60 minutes
Static analysis: Around Java in 60 minutesStatic analysis: Around Java in 60 minutes
Static analysis: Around Java in 60 minutesAndrey Karpov
 

Ähnlich wie White-box Unit Test Generation with Microsoft IntelliTest (20)

Mutation testing for a safer Future
Mutation testing for a safer FutureMutation testing for a safer Future
Mutation testing for a safer Future
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testing
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testing
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.
 
Symbolic Execution And KLEE
Symbolic Execution And KLEESymbolic Execution And KLEE
Symbolic Execution And KLEE
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzer
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
 
Scaffolding with JMock
Scaffolding with JMockScaffolding with JMock
Scaffolding with JMock
 
A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)
 
Google test training
Google test trainingGoogle test training
Google test training
 
Google mock training
Google mock trainingGoogle mock training
Google mock training
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
 
31b - JUnit and Mockito.pdf
31b - JUnit and Mockito.pdf31b - JUnit and Mockito.pdf
31b - JUnit and Mockito.pdf
 
How to write clean & testable code without losing your mind
How to write clean & testable code without losing your mindHow to write clean & testable code without losing your mind
How to write clean & testable code without losing your mind
 
Unit test
Unit testUnit test
Unit test
 
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMEREVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
 
Static analysis: Around Java in 60 minutes
Static analysis: Around Java in 60 minutesStatic analysis: Around Java in 60 minutes
Static analysis: Around Java in 60 minutes
 

Kürzlich hochgeladen

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Kürzlich hochgeladen (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

White-box Unit Test Generation with Microsoft IntelliTest

  • 1. Budapest University of Technology and Economics Department of Measurement and Information Systems Budapest University of Technology and Economics Fault Tolerant Systems Research Group White-box Unit Test Generation with Microsoft IntelliTest Dávid Honfi 1
  • 2. Focus 2 module B module C service Unit testing module A Code-based (White-box)
  • 3. White-box test design public int M1(int a, int b) { if(a == 0) { Console.WriteLine(ERROR_MSG); return -1; } if(b > a) return b*a+5; else return (a+b)/2; } Let’s cover all the statements! a==0 a!=0 && b>a a!=0 && b<=a a==0 a!=0 && b<=a a!=0 & b>a a 0 1 2 b 0 0 3
  • 4. What’s missing?  Usually encoding observed outputs  Where can it be employed? oBasic, common bugs (e.g., uncaught exceptions) oViolation of assertions or contracts oDeviations from existing outputs (regression)  Automation with code exploration test case = input + expected output
  • 5. Symbolic execution: the idea  Static program analysis technique from the ’70s  Application for test generation o Symbolic variables instead of normal ones o Constraints forming for each path with symb. variables o Constraint solving (e.g., SMT solver) o A solution yields an input to execute a given path  New century, new progress: o Enough computing power (e.g., for SMT solvers) o New ideas, extensions, algorithms and tools 5
  • 6. Existing tools using symbolic execution  .NET: Microsoft IntelliTest (a.k.a. Pex)  x86 binary: Microsoft SAGE  Java oNASA Symbolic PathFinder oCATG o…  JavaScript: Jalangi  C: KLEE
  • 8. DEMO 1. The basic use of IntelliTest
  • 9. public int M1(int a, int b) { if(a == 0) { Console.WriteLine(ERROR_MSG); return -1; } if(b > a) return b*a+5; else return (a+b)/2; } Details of IntelliTest (Dynamic SE) Source code Concrete input values Symbolic variables Constraint solver Constraints Concrete execution Symbolic execution a==0 a:=0 b:=0 a,b Transformationa!=0 a:=1 b:=0
  • 10. public int M1(int a, int b) { if(a == 0) { Console.WriteLine(ERROR_MSG); return -1; } if(b > a) return b*a+5; else return (a+b)/2; } Details of IntelliTest (Dynamic SE) Source code Concrete input values Symbolic variables Constraint solver Constraints Concrete execution Symbolic execution a!=0 && b<=a a!=0 && b>a a:=1 b:=0 a:=2 b:=3
  • 11. Parameterized Unit Testing  Idea: Using test methods as specifications o Easy to understand, easy to check, etc. o But: too specific (used for a code unit), verbose, etc.  Parameterized Unit Test (PUT) o Wrapper method for method/unit under test o Main elements • Inputs of the unit • Assumptions for input space restriction • Call to the unit • Assertions for expected results o Serves as a specification  Test generators can use it 11
  • 12. Example: Parameterized Unit Testing 12 void ReduceQuantityPUT(Product prod, int soldCount) { // Assumptions Assume.IsTrue(prod != null && prod.Quantity > 0); Assume.IsTrue(soldCount > 0); int oldQuantity = prod.Quantity; // Calling the UUT int newQuantity = StorageManager.ReduceQuantity(prod,soldCount); // Assertions Assert.IsTrue(newQuantity >= 0); Assert.IsTrue(newQuantity < oldQuantity); } /// The method reduces the quantity of the specified /// product. The product is known to be NOT null with /// quantity larger than 0, also the sold amount is /// always more than zero. The method has effects on /// the database, and returns the new quantity of the /// product. If the quantity would be negative, the /// method reduces the quantity to zero. int ReduceQuantity(Product prod, int soldCount) { … }
  • 13. Example: Parameterized Unit Testing 13 void ReduceQuantityPUT(Product prod, int soldCount) { // Assumptions Assume.IsTrue(prod != null && prod.Quantity > 0); Assume.IsTrue(soldCount > 0); int oldQuantity = prod.Quantity; // Calling the UUT int newQuantity = StorageManager.ReduceQuantity(prod,soldCount); // Assertions Assert.IsTrue(newQuantity >= 0); Assert.IsTrue(newQuantity < oldQuantity); } /// The method reduces the quantity of the specified /// product. The product is known to be NOT null with /// quantity larger than 0, also the sold amount is /// always more than zero. The method has effects on /// the database, and returns the new quantity of the /// product. If the quantity would be negative, the /// method reduces the quantity to zero. int ReduceQuantity(Product prod, int soldCount) { … }
  • 14. DEMO 2. Parameterized Unit Testing with IntelliTest
  • 15. Challenges of SE-based techniques 1. Exponential growth of execution paths 2. Complex arithmetic expressions 3. Floating point operations 4. Compound structures and objects 5. Pointer operations 6. Interaction with the environment 7. Multithreading 8. … 15 T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”. Future Generation Computer Systems, 29(7), 2013
  • 16. Challenges of SE-based techniques 1. Exponential growth of execution paths 2. Complex arithmetic expressions 3. Floating point operations 4. Compound structures and objects 5. Pointer operations 6. Interaction with the environment 7. Multithreading 8. … 16 T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”. Future Generation Computer Systems, 29(7), 2013 SEViz
  • 17. Visualizing symbolic execution  SEViz: Symbolic Execution VIsualiZer  Goal: Help identifying test generation problems o Long execution paths o Unsolvable constraints o …  Solution: Symbolic execution tree with metadata 17 Mapping to source code Calls to constraint solver 1 No Yes End of execution paths No test Failed test Passed test 1 11 1 1 1 SHAPE BORDER COLOR
  • 18. Visualizing symbolic execution  Additional metadata o Sequence number o Path condition o Incremental path condition (based on parent) o Status: can have siblings or not o Source code mapping (if available) 18
  • 19. DEMO 3. Visualizing test generation with SEViz
  • 20. Challenges of SE-based techniques 1. Exponential growth of execution paths 2. Complex arithmetic expressions 3. Floating point operations 4. Compound structures and objects 5. Pointer operations 6. Interaction with the environment 7. Multithreading 8. … 20 T. Chen et al. „State of the art: Dynamic symbolic execution for automated test generation”. Future Generation Computer Systems, 29(7), 2013 SEViz Automated isolation
  • 21. Existing solutions  Stubbing and mocking (faking) o Fixed values and checks for all DSE executions o Not suitable for test generation  Parameterized mocking o Interaction with DSE is possible • More relevant test cases • Custom behavior in mocks: e.g., state change of objects o Introduces complexity for users of DSE • Requires large amount of time and effort • Not trivial task in case of complex structures o Fakes cannot be generated under certain conditions 21
  • 22. Approach for automated isolation  Automated isolation on source code level 1. Abstract syntax tree transformations in the SUT 2. Parameterized sandbox synthesization 22 SUT C1 C2 Environment i(C1,C2) i(C2,E) i(C2,C1) i(C1,E) SUT C1’ C2’ Environment SB i'(C2,E)i'(C1,E) i(C2,C1) i(C1,C2) Replaced external objects Replaced external calls Sandbox
  • 23. Example of AST transformation 23 public class WeekendNotifier { public bool IsWeekendNear() { DateTime date = DateTime.GetNow(); date.AddDays(2); if(date.GetDay() == "Saturday") return true; return false; } } public class WeekendNotifier { public bool IsWeekendNear() { DynamicFake date = Fake.DateTimeGetNow(); Fake.DateTimeAddDays(2,date); if(Fake.DateTimeGetDay(date) == "Saturday") return true; return false; } }
  • 24. Example of parameterized sandbox 24 public static class Fake { public DynamicFake DateTimeGetNow() { // Return a state container object instead of the original return new DynamicFake(); } public void DateTimeAddDays(int days, DynamicFake date) { // TODO: State change of date using DSE } public int DateTimeGetDay(DynamicFake date) { // Obtaining return value from DSE return DSEEngine.ChooseValue<int>(); } }
  • 25. Summary  White-box test generation: symbolic execution  IntelliTest, a state-of-the-art test generator o Dynamic Symbolic Execution (DSE) o Parameterized Unit Tests  DSE has several challenges, e.g.: o Test generation problem indentification o Environment dependencies  My research o SEViz: A tool for visualizing symbolic execution o Automated isolation with source code transformation 25
  • 26. Resources  IntelliTest https://www.visualstudio.com/en- us/docs/test/developer-testing/intellitest-manual https://www.codehunt.com/  SEViz [ICST’15 Tool Paper] https://ftsrg.github.io/seviz  Automated isolation https://pp.bme.hu/eecs/article/view/9768 26

Hinweis der Redaktion

  1. De hogyan is néz ki a forráskód alapú teszttervezés A cél természetesen specifikáció hiányában például az lehet, hogy fedjük az összes lehetséges utasítást. Hát csináljuk is ezt meg kézzel. Van egy writelineunk és utána egy returnünk. A bemeneti paramétereket figyelembe véve milyen feltétellel juthatunk el ezekre az utasításokra? Nyilvánvalóan ha a==0, de nézzük a következő return utasítást. Ide milyen feltételt szabhatunk a bemeneti változóinkra? Azt tudjuk már, hogy az a!=0, és most hozzá ÉS-eljük a b>a-t. Hasonlóképp a harmadik return utasításhoz is szabhatunk feltételt, ha az a!=0-t összeÉS-eljük a b<=a-val. Oké, de ebből hogyan kapunk teszteket? Hát nagyon egyszerű módon: fogjuk a formulákat és kielégítő behelyettesítéseket adunk a változóiknak, ahogy például a táblázatban szerepel. Ezekkel a bemenetekkel már pont meghajthatjuk a formulákhoz tartozó egyes utasításokat, így tesztelhetjük őket.
  2. Na jó, de azért egy kicsit valami sántít. Mi maradt ki? Hát az, hogy egy teszteset az nem csak bemenetekből, hanem elvárt kimenetekből és még egyéb tesztadatokból is állhat. De mégis mi az, amit elvárt kimenet nélkül észre tudunk venni? Egyszerű, általános hibákat úgy mint nem várt kivételek Észrevehetjük a kódban lévő assertionök megsértését Esetleg regressziós tesztkészletként használhatjuk és az újabb forráskódverziók kimeneteit összevethetjük a korábbiakkéval. Esetleg több különböző implementáció ekvivalenciájának ellenőrzését is megoldhatjuk vele.
  3. De lássuk, hogy milyen eszközök léteznek a kód alapú tesztgenerálásra .NET-hez van két Microsoft Research fejlesztés Az egyik, amiről ma is beszélek majd: az IntelliTest (korábbi nevén Pex) Míg a másik a SAGE, ami egy belső toolja a Microsoftnak security testingre. Elmondásaik alapján mindennap használják a Windows és az Office fejlesztéséhez A Win7 security bugjainak nagy részét ezzel találták meg. Természetesen Java-hoz is léteznek eszközök, az egyiket ráadásul a NASA fejleszti Symbolic PathFinder néven. Említhetjük még a JavaScript-es Jalangit és a C-s KLEE eszközt is. A KLEE érdekessége, hogy belső engine-ként felhasználja a Cloud9 tesztgeneráló eszköz, amit ha jól tudom a svájci részecskekutató-intézetben a CERN-ben is használnak. Az azért látható a fejlesztőkből, hogy olyan szervezetek is használják őket, ahol biztonságkritikus fejlesztések folynak.
  4. Az említett eszközök közül én ma az IntelliTest-ről fogok nektek bővebben mesélni. Az IntelliTest a Visual Studio 2015 Enterprise verziójában jelent meg először ezen a néven Néhányotok számára viszont ismerős lehet a Pex vagy a Code Digger elnevezés is. A Pex az IntelliTest korábbi neve volt, most pedig az eszköz mögött lévő engine-t nevezik így. A Code Digger pedig a VS2013-hoz volt elérhető kiegészőként, ez a Pex egy jelentősen lebutított változata volt.
  5. - Menjünk bele egy kicsit a részletekbe is, és lássuk mi is az a szimbolikus végrehajtás. - A Pex engine a háttérben hasonlóképp működik ahogyan azt a dián kézzel is végigvittük. A kód bejárását alacsony szintű .NET-es mágiával és saját parancsértelmezővel viszi véghez. - A bejáráshoz konkrét végrehajtást alkalmaz, amely során összegyűjti azokat a feltételeket avagy formulákat, amik az egyes, még felderítetlen kódrészek bejárásához szükségesek (ahogyan ezt mi is kézzel megtettük). - Ezeket átadja egy speciális eszköznek (úgynevezett Z3 kényszermegoldónak - szintén MS Research fejlesztés), amitől visszakapja ezeknek a formuláknak egy konkrét behelyettesítését. Ez a behelyettesítés fogja adni egy adott végrehajtási útvonalhoz szükséges bemeneteket. És itt jutottunk egy visszacsatoláshoz, a Pex addig fogja ezt az iterációt csinálni, amíg létezik olyan lefutási útvonal, aminek a kényszerét még nem oldotta meg. - Mind mondottam, az IntelliTestnek ez csak a legegyszerűbb használati esete volt. - Lássuk, hogy egy kicsivel bonyolultabb problémát hogyan old meg az eszköz.
  6. Of course, there are existing solutions to alleviate the environment dependency problem: such as Stubbing and Mocking However, this uses fixed values and checks for all DSE execution paths, and thus not suitable for test generation That is the reason why a technique called parameterized mocking was introduced recently, that enables the interaction of DSE and mocks By using this technique DSE can generate more relevant cases, and also it enables the definition of custom behavior like changing states of objects in the mocks by using values obtained from the DSE On the other, this introduces, complexity… AUTOMATION Also, the fake objects are usually provided by isolatino frameworks that cannot be used under certain conditions and have several limitations AVOID USING ISOLATION FWs
  7. Thus our approach is to automatically isolate the dependencies on the source code level in order to alleviate DSE-based test generation * First, our technique transforms the AST of the unit under test, then an algorithm synthesizes a parameterized sandbox that can be utilized by the DSE itself * In order to show it visually, consider the previous example, our approach transforms the unit under test by replacing external type usages and external invocations * Also, the tecnhnique generates a paramterized sandbox, where the replace invocations are pointing to * And in the end, you can see that there is no access to the environment External objects ->DynamicFake state containers
  8. On this slide, I would like to present the AST transformation by an example class called WeekendNotifier … So, we have just transformed the unit under test, however our invocations are pointing to nowhere. At this point, the generation of the sandbox comes in.
  9. The external invocations are synthesized in a form of method stubs into a Fake class that contains all of these synthesized methods.. F