SlideShare a Scribd company logo
1 of 20
JUNITMX
           A Change-aware Unit Testing Tool
           Jan Wloka
           PROLANGS
           Rutgers University




                                        Barbara G. Ryder     Frank Tip
                                          Virginia Tech    IBM Research
© Jan Wloka 2009 All Rights reserved.
Change-aware Tools

                      Concept: Compare different versions of a program
                      Decompose edit into 19 distinct atomic changes
                        Reflecting language semantics
                        Potential change in dispatch behavior
                      Inter-dependences between changes
                         Syntactic, structural requirements
                         Cause – effect mapping


© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model   Program Behavior



           AST :: original

                                            P

                            I                       C


                            M                       M



            AST :: edited

                                            P

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model   Program Behavior



           AST :: original

                                            P

                            I                       C

                                                            C
                            M                       M


                                                            M         M
            AST :: edited

                                            P

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model     Program Behavior



           AST :: original

                                            P

                            I                       C
                                                                 AC
                                                            C
                            M                       M

                                                                AM        AM
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
Computing Change Coverage

                      Program Source Code                   Atomic Change Model          Program Behavior



           AST :: original                                                          LC
                                                                                                call graph :: test1
                                            P
                                                                                    LC
                            I                       C
                                                                 AC
                                                            C
                            M                       M
                                                                                    LC
                                                                AM        AM                    call graph :: test2
                                                            M         M
            AST :: edited

                                            P                    CM            CM

                        I                   C           C


                       M                M       M   M




© Jan Wloka 2009 All Rights reserved.
The Tool JUNITMX

                   CHIANTI :: JDT Plug-in
                            Setup versions for
                            comparison
                            Build change model
                   JUNITMX :: JUnit Extension
                            Capture tested program
                            behavior
                            Compute change
                            coverage for each test

© Jan Wloka 2009 All Rights reserved.                4
DEMO: Change-centric Testing
           The test-first Way!

                   Goal: Extend Counter to a Multi-Counter application
                            Add new tests for increment a MultiCounter
                            Define the feature MultiCounter increment
                            Explore untested change effects and write new tests




© Jan Wloka 2009 All Rights reserved.                                             5
DEMO: Change-centric Testing
           The test-first Way!

                   Goal: Extend Counter to a Multi-Counter application
                            Add new tests for increment a MultiCounter
                            Define the feature MultiCounter increment
                            Explore untested change effects and write new tests
                   Support by JUNITMX:
                            Yellow bar may indicate weak design
                            Untested Changes assist in design specifications


© Jan Wloka 2009 All Rights reserved.                                             5
DEMO: Change-centric Testing
           In test-last manner!
                   Goal: Add a decrement feature
                            Add an implementation for decrementing counters
                            Explore untested changes
                            Add a new tests exercising the added features




© Jan Wloka 2009 All Rights reserved.                                         6
DEMO: Change-centric Testing
           In test-last manner!
                   Goal: Add a decrement feature
                            Add an implementation for decrementing counters
                            Explore untested changes
                            Add a new tests exercising the added features
                   Support by JUNITMX:
                            Yellow bar indicate untested change effects
                            Changes count motivates test development
                            Untested Changes assist in writing effective tests


© Jan Wloka 2009 All Rights reserved.                                            6
JUNITMX Infrastructure Overview


                                        JUNITMX
                                                       Atomic
                 Original                   CHIANTI   Changes
                 Program
                                                                  Test Run
                                                        Call                    Change
                                              DILA     Graphs
                                                                    Post-
                                                                              Classification
                                                                 processing
                 Edited
                Program                                 Test
                   w/                        JUNIT    Outcomes
                TestSuite




© Jan Wloka 2009 All Rights reserved.                                                         7
Under the Hood

                                                   Eclipse Workbench                     Launch Configuration              Instrumenting
                                                    JVM ClassLoader                        JVM ClassLoader                 ClassLoader


                                        Change                                                                              org.junit.*
                                                               IAnalysis
                                         Impact
                                                               Processor
                                        Analysis                                          IData           runTests()
                                                                                         Collector                        org.eclipse.jdt.
                                                                                                                              junit.*

                                   [1]:createChanges()   processData(IExecutionData[])                                    org.eclipse.jdt.
                                                                                                     IExecutionData[]     internal.junit.*

                                                         [3]                                                                  junitmx.
                                Instrumenting
                                                                                          Test                           eclipse.jdt.junit.*
                                 JUnitLaunch
                                                          [2] : launch()                 Runner
                                Configuration
                                                                                         Wrapper
     JUnitMX
                                  Delegate                                                                                    Target
     Launch                                                                                                                 Application




                                  Compute
                                  JUnitMX                                                                                 Add JUnitMX to
                                                                                            Add JUnitMX to
                                  classpath                                                                                classpath and
                                                                                              classpath
                                                                                                                        classloader targets
© Jan Wloka 2009 All Rights reserved.                                                                                                          8
Research Track:!Friday, 4 -5:30
                                                                Grand Ballroom Salon B
           Wrapping up                                               “Safe-Commit Analysis to Facilitate
                                                                             Team Software Development”


                   JUNITMX provides test coverage of change effects
                            Test-first: Guide for better design specifications
                            Test-last: Guide for development of effective tests
                                        Note: Absence of missing changes is not shown!

                   Other Change-aware tools
                            Fault finding, Version Control, Refactoring
                   Follow-ups:
                            Project: [www.prolangs.rutgers.edu/projects/chianti/]
                            Updates: [www.wlokas.de/jan/]
© Jan Wloka 2009 All Rights reserved.                                                                      9

More Related Content

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
+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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

JUnitMX: A Change-aware Unit Testing Tool

  • 1. JUNITMX A Change-aware Unit Testing Tool Jan Wloka PROLANGS Rutgers University Barbara G. Ryder Frank Tip Virginia Tech IBM Research © Jan Wloka 2009 All Rights reserved.
  • 2. Change-aware Tools Concept: Compare different versions of a program Decompose edit into 19 distinct atomic changes Reflecting language semantics Potential change in dispatch behavior Inter-dependences between changes Syntactic, structural requirements Cause – effect mapping © Jan Wloka 2009 All Rights reserved.
  • 3. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original P I C M M AST :: edited P I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 4. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original P I C C M M M M AST :: edited P I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 5. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original P I C AC C M M AM AM M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 6. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC P LC I C AC C M M LC AM AM M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 7. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 8. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 9. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 10. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 11. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 12. Computing Change Coverage Program Source Code Atomic Change Model Program Behavior AST :: original LC call graph :: test1 P LC I C AC C M M LC AM AM call graph :: test2 M M AST :: edited P CM CM I C C M M M M © Jan Wloka 2009 All Rights reserved.
  • 13. The Tool JUNITMX CHIANTI :: JDT Plug-in Setup versions for comparison Build change model JUNITMX :: JUnit Extension Capture tested program behavior Compute change coverage for each test © Jan Wloka 2009 All Rights reserved. 4
  • 14. DEMO: Change-centric Testing The test-first Way! Goal: Extend Counter to a Multi-Counter application Add new tests for increment a MultiCounter Define the feature MultiCounter increment Explore untested change effects and write new tests © Jan Wloka 2009 All Rights reserved. 5
  • 15. DEMO: Change-centric Testing The test-first Way! Goal: Extend Counter to a Multi-Counter application Add new tests for increment a MultiCounter Define the feature MultiCounter increment Explore untested change effects and write new tests Support by JUNITMX: Yellow bar may indicate weak design Untested Changes assist in design specifications © Jan Wloka 2009 All Rights reserved. 5
  • 16. DEMO: Change-centric Testing In test-last manner! Goal: Add a decrement feature Add an implementation for decrementing counters Explore untested changes Add a new tests exercising the added features © Jan Wloka 2009 All Rights reserved. 6
  • 17. DEMO: Change-centric Testing In test-last manner! Goal: Add a decrement feature Add an implementation for decrementing counters Explore untested changes Add a new tests exercising the added features Support by JUNITMX: Yellow bar indicate untested change effects Changes count motivates test development Untested Changes assist in writing effective tests © Jan Wloka 2009 All Rights reserved. 6
  • 18. JUNITMX Infrastructure Overview JUNITMX Atomic Original CHIANTI Changes Program Test Run Call Change DILA Graphs Post- Classification processing Edited Program Test w/ JUNIT Outcomes TestSuite © Jan Wloka 2009 All Rights reserved. 7
  • 19. Under the Hood Eclipse Workbench Launch Configuration Instrumenting JVM ClassLoader JVM ClassLoader ClassLoader Change org.junit.* IAnalysis Impact Processor Analysis IData runTests() Collector org.eclipse.jdt. junit.* [1]:createChanges() processData(IExecutionData[]) org.eclipse.jdt. IExecutionData[] internal.junit.* [3] junitmx. Instrumenting Test eclipse.jdt.junit.* JUnitLaunch [2] : launch() Runner Configuration Wrapper JUnitMX Delegate Target Launch Application Compute JUnitMX Add JUnitMX to Add JUnitMX to classpath classpath and classpath classloader targets © Jan Wloka 2009 All Rights reserved. 8
  • 20. Research Track:!Friday, 4 -5:30 Grand Ballroom Salon B Wrapping up “Safe-Commit Analysis to Facilitate Team Software Development” JUNITMX provides test coverage of change effects Test-first: Guide for better design specifications Test-last: Guide for development of effective tests Note: Absence of missing changes is not shown! Other Change-aware tools Fault finding, Version Control, Refactoring Follow-ups: Project: [www.prolangs.rutgers.edu/projects/chianti/] Updates: [www.wlokas.de/jan/] © Jan Wloka 2009 All Rights reserved. 9