• Save
JUnitMX: A Change-aware Unit Testing Tool
Upcoming SlideShare
Loading in...5
×
 

JUnitMX: A Change-aware Unit Testing Tool

on

  • 2,749 views

Developers use unit testing to improve the quality of software systems. Current development tools for unit testing help with automating test execution, with reporting results, and with generating test ...

Developers use unit testing to improve the quality of software systems. Current development tools for unit testing help with automating test execution, with reporting results, and with generating test stubs. However, they offer no aid for designing tests aimed
specifically at exercising the effects of changes to a program. This demo presents a unit testing tool that leverages a change model to assist developers in the creation of new unit tests. The tool provides developers with quantitative feedback and detailed information about change effects, which not only facilitate the writing of more effective tests, but also motivate developers with an achievable coverage goal.

Statistics

Views

Total Views
2,749
Views on SlideShare
2,741
Embed Views
8

Actions

Likes
3
Downloads
0
Comments
0

2 Embeds 8

http://www.slideshare.net 7
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

JUnitMX: A Change-aware Unit Testing Tool JUnitMX: A Change-aware Unit Testing Tool Presentation Transcript

  • 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