SlideShare a Scribd company logo
1 of 15
Test-driven development and
Umple
Introduction
๏‚— Test-driven development is a very common
development process for open-source
software projects, especially those which
adhere to Agile principles or which use
continuous integration.
๏‚— All development for the open-source UML
programming language, Umple, should be
done using TDD principles. This decision
leads to more manageable, understandable
code.
Umple
๏‚— Umple is a language used for both object-oriented
programming and modeling with class and state
diagrams.
๏‚— The name Umple is a portmanteau of โ€œUMLโ€, โ€œampleโ€,
and โ€œprogramming languageโ€. This is meant to convey
that Umple provides ample features to extend
programming languages with UML capabilities, such
as Java, PHP, or Ruby. Code can also be generated
in these mentioned languages from a source Umple
file.
๏‚— Created in 2008, Umple was open-sourced in 2011
when it was released publicly on Google Code.
Test-driven development (TDD)
๏‚— TDD is a software development process with two
main rules:
1. Donโ€Ÿt write a new line of code unless you have a
failing automated test.
2. Eliminate duplication.
๏‚— These two rules imply an order to the tasks of
programming in a TDD environment:
โ€ข Developer writes an (initially failing) automated test
case that defines the desired improvement or new
functionality
โ€ข Developer writes the minimum code required to
pass the automated test case
โ€ข Developer refactors the new code to acceptable
standards
โ€œRed/green/refactorโ€
๏‚— The TDD mantra, โ€œRed/green/refactorโ€ is visually
depicted as a repetitive process in the figure below.
Benefits of TDD
๏‚— By writing automated tests first during
development, we can:
โ€ข Fully imagine and plan our changes before
actually implementing them
โ€ข Ensure the changes produce expected
behaviours
โ€ข Changes must be fully tested on a developerโ€Ÿs
local environment before they are committed to
source
โ€ข Ensure the changes donโ€Ÿt affect other areas
of the source code
โ€ข Potentially catch errors we may have
missed without tests
Testing in Umple
๏‚— There are several levels of testing in the Umple compiler.
Testing also exists for all of the non-compiler components.
The primary levels of compiler testing are as follows:
โ€ข Parser tests verify that a construct parses correctly
โ€ข Metamodel tests check that the metamodel is populated
correctly by the various umple constructs
โ€ข Template tests verify that the generated output in
languages like Java is as expected
โ€ข Testbed tests verify that compiled code that generates
languages such as Java can then compile under the
language compiler
โ€ข User manual tests verify that examples in the user
manual can properly run
๏‚— The separation of testing levels comes naturally from the
hierarchal components of Umpleโ€Ÿs architecture.
TDD & Umple
๏‚— TDD complements the collaborative and
distributed way in which Umple is developed
๏‚— Umple is developed using a continuous
integration process, which works very well
with TDD
๏‚— The continuous integration process makes it so that
any changes committed to the Umple source
repository are immediately tested to ensure that
they do not negatively effect the build
TDD & Umple contโ€Ÿd
๏‚— The figure below shows an example of the continuous
integration process which relies on TDD. Changes are
committed to the code base until an error is detected by
the build process. Once an error is detected, action must
be taken to resolve that error before any other new
commits can be integrated into the source repository.
Practical Example โ€“ Refactoring Some Code
๏‚— Revision r3915 provides a clean example of how
refactoring can work in a TDD environment.
๏‚— The goal of this revision was to extract a portion of code
from the method โ€žcheckDefaultedNameConflict()โ€Ÿ in the
โ€žUmpleInternalParser_Code.umpโ€Ÿ class so said code
could be put into its own method and used in other
places.
๏‚— Instead of having this code at the parser level, it makes
more sense to have it at the model level.
Practical Example โ€“ Refactoring contโ€Ÿd
๏‚— Steps taken to complete code changes in Revision
r3915:
1. Analysed the code needing to be extracted and determine
where it will reside once it has been refactored.
๏‚— In this case, the code was suited to be moved to the โ€žUmpleModelโ€Ÿ
class
๏‚— The figure below shows the code needing to be extracted in red
Practical Example โ€“ Refactoring contโ€Ÿd
๏‚— Steps taken to complete code changes in Revision
r3915:
2. (RED) - Wrote unit tests for the new method based on
expected behaviour.
๏‚— All of the tests went in the โ€žUmpleModelTestโ€Ÿ class (at the
metamodel level) as can be seen in the figure below
๏‚— These tests all initially failed (wouldnโ€Ÿt even compile) because the
new method had not been created yet
Practical Example โ€“ Refactoring contโ€Ÿd
๏‚— Steps taken to complete code changes in Revision
r3915:
๏‚— (GREEN) - Created the new method in its new location and ran
the unit tests
๏‚— In the โ€žUmpleModelโ€Ÿ class, the new method โ€žgetAllTranslators()โ€Ÿ was
created using code extracted from the โ€žcheckDefaultedNameConflict()โ€Ÿ
method, as can be seen in the figure below
๏‚— Ran tests and they all passed; therefore, new method behaved as
expected
๏‚— If tests hadnโ€Ÿt passed, would have modified the method and run the
tests again
Practical Example โ€“ Refactoring contโ€Ÿd
๏‚— Steps taken to complete code changes in Revision
r3915:
๏‚— (REFACTOR) โ€“ Cleaned up code to use the refactored
changes
๏‚— Changed the code in โ€žcheckDefaultedNameConflict()โ€Ÿ method so
the new method was being used
๏‚— The figure below shows the refactored code in green
Conclusion
๏‚— The TDD process integrates very well with the
distributed nature of development on an open-
source project.
๏‚— By adhering to TDD principles, contributors to the
Umple project are ensuring that the code is
reliable and maintainable, and are making it easier
for new developers to contribute in the future.

More Related Content

What's hot

What's hot (20)

Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
ย 
Using general sub procedures
Using general sub proceduresUsing general sub procedures
Using general sub procedures
ย 
Lessons learned on software testing automation
Lessons learned on software testing automationLessons learned on software testing automation
Lessons learned on software testing automation
ย 
DIG1108 Lesson 7
DIG1108 Lesson 7DIG1108 Lesson 7
DIG1108 Lesson 7
ย 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1
ย 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009
ย 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation Framework
ย 
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven DevelopmentABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ย 
Software testing tools
Software testing toolsSoftware testing tools
Software testing tools
ย 
Automation Testing and its importance
Automation Testing and its importanceAutomation Testing and its importance
Automation Testing and its importance
ย 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
ย 
Rft courseware
Rft coursewareRft courseware
Rft courseware
ย 
Test Driven Development #sitFRA
Test Driven Development #sitFRATest Driven Development #sitFRA
Test Driven Development #sitFRA
ย 
[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++
ย 
ABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir MajerABAPCodeRetreat - TDD Intro by Damir Majer
ABAPCodeRetreat - TDD Intro by Damir Majer
ย 
Unit Testing
Unit TestingUnit Testing
Unit Testing
ย 
The Economics of OptimJ
The Economics of OptimJThe Economics of OptimJ
The Economics of OptimJ
ย 
Coding principles
Coding principles Coding principles
Coding principles
ย 
Mohammed Kharma-A flexible framework for quality assurance and testing of sof...
Mohammed Kharma-A flexible framework for quality assurance and testing of sof...Mohammed Kharma-A flexible framework for quality assurance and testing of sof...
Mohammed Kharma-A flexible framework for quality assurance and testing of sof...
ย 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
ย 

Similar to Test-driven development and Umple

Test driven development
Test driven developmentTest driven development
Test driven development
Harry Potter
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
Luis Goldster
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
Tony Nguyen
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
Young Alista
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
James Wong
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
Fraboni Ec
ย 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
Ashesh R
ย 

Similar to Test-driven development and Umple (20)

Test-drive development and Umple
Test-drive development and UmpleTest-drive development and Umple
Test-drive development and Umple
ย 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
ย 
Coding
CodingCoding
Coding
ย 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Test driven development
Test driven developmentTest driven development
Test driven development
ย 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
ย 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
ย 
Clean Code - Part 2
Clean Code - Part 2Clean Code - Part 2
Clean Code - Part 2
ย 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
ย 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
ย 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
ย 
Web tech: lecture 5
Web tech: lecture 5Web tech: lecture 5
Web tech: lecture 5
ย 
Algorithm-Introduction ,Characterestics & Control Structures.pdf
Algorithm-Introduction ,Characterestics & Control Structures.pdfAlgorithm-Introduction ,Characterestics & Control Structures.pdf
Algorithm-Introduction ,Characterestics & Control Structures.pdf
ย 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
bodapatigopi8531
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
anilsa9823
ย 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ย 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
ย 
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
ย 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
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
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
ย 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
ย 
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
ย 
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
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
ย 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
ย 
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
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
ย 

Test-driven development and Umple

  • 2. Introduction ๏‚— Test-driven development is a very common development process for open-source software projects, especially those which adhere to Agile principles or which use continuous integration. ๏‚— All development for the open-source UML programming language, Umple, should be done using TDD principles. This decision leads to more manageable, understandable code.
  • 3. Umple ๏‚— Umple is a language used for both object-oriented programming and modeling with class and state diagrams. ๏‚— The name Umple is a portmanteau of โ€œUMLโ€, โ€œampleโ€, and โ€œprogramming languageโ€. This is meant to convey that Umple provides ample features to extend programming languages with UML capabilities, such as Java, PHP, or Ruby. Code can also be generated in these mentioned languages from a source Umple file. ๏‚— Created in 2008, Umple was open-sourced in 2011 when it was released publicly on Google Code.
  • 4. Test-driven development (TDD) ๏‚— TDD is a software development process with two main rules: 1. Donโ€Ÿt write a new line of code unless you have a failing automated test. 2. Eliminate duplication. ๏‚— These two rules imply an order to the tasks of programming in a TDD environment: โ€ข Developer writes an (initially failing) automated test case that defines the desired improvement or new functionality โ€ข Developer writes the minimum code required to pass the automated test case โ€ข Developer refactors the new code to acceptable standards
  • 5. โ€œRed/green/refactorโ€ ๏‚— The TDD mantra, โ€œRed/green/refactorโ€ is visually depicted as a repetitive process in the figure below.
  • 6. Benefits of TDD ๏‚— By writing automated tests first during development, we can: โ€ข Fully imagine and plan our changes before actually implementing them โ€ข Ensure the changes produce expected behaviours โ€ข Changes must be fully tested on a developerโ€Ÿs local environment before they are committed to source โ€ข Ensure the changes donโ€Ÿt affect other areas of the source code โ€ข Potentially catch errors we may have missed without tests
  • 7. Testing in Umple ๏‚— There are several levels of testing in the Umple compiler. Testing also exists for all of the non-compiler components. The primary levels of compiler testing are as follows: โ€ข Parser tests verify that a construct parses correctly โ€ข Metamodel tests check that the metamodel is populated correctly by the various umple constructs โ€ข Template tests verify that the generated output in languages like Java is as expected โ€ข Testbed tests verify that compiled code that generates languages such as Java can then compile under the language compiler โ€ข User manual tests verify that examples in the user manual can properly run ๏‚— The separation of testing levels comes naturally from the hierarchal components of Umpleโ€Ÿs architecture.
  • 8. TDD & Umple ๏‚— TDD complements the collaborative and distributed way in which Umple is developed ๏‚— Umple is developed using a continuous integration process, which works very well with TDD ๏‚— The continuous integration process makes it so that any changes committed to the Umple source repository are immediately tested to ensure that they do not negatively effect the build
  • 9. TDD & Umple contโ€Ÿd ๏‚— The figure below shows an example of the continuous integration process which relies on TDD. Changes are committed to the code base until an error is detected by the build process. Once an error is detected, action must be taken to resolve that error before any other new commits can be integrated into the source repository.
  • 10. Practical Example โ€“ Refactoring Some Code ๏‚— Revision r3915 provides a clean example of how refactoring can work in a TDD environment. ๏‚— The goal of this revision was to extract a portion of code from the method โ€žcheckDefaultedNameConflict()โ€Ÿ in the โ€žUmpleInternalParser_Code.umpโ€Ÿ class so said code could be put into its own method and used in other places. ๏‚— Instead of having this code at the parser level, it makes more sense to have it at the model level.
  • 11. Practical Example โ€“ Refactoring contโ€Ÿd ๏‚— Steps taken to complete code changes in Revision r3915: 1. Analysed the code needing to be extracted and determine where it will reside once it has been refactored. ๏‚— In this case, the code was suited to be moved to the โ€žUmpleModelโ€Ÿ class ๏‚— The figure below shows the code needing to be extracted in red
  • 12. Practical Example โ€“ Refactoring contโ€Ÿd ๏‚— Steps taken to complete code changes in Revision r3915: 2. (RED) - Wrote unit tests for the new method based on expected behaviour. ๏‚— All of the tests went in the โ€žUmpleModelTestโ€Ÿ class (at the metamodel level) as can be seen in the figure below ๏‚— These tests all initially failed (wouldnโ€Ÿt even compile) because the new method had not been created yet
  • 13. Practical Example โ€“ Refactoring contโ€Ÿd ๏‚— Steps taken to complete code changes in Revision r3915: ๏‚— (GREEN) - Created the new method in its new location and ran the unit tests ๏‚— In the โ€žUmpleModelโ€Ÿ class, the new method โ€žgetAllTranslators()โ€Ÿ was created using code extracted from the โ€žcheckDefaultedNameConflict()โ€Ÿ method, as can be seen in the figure below ๏‚— Ran tests and they all passed; therefore, new method behaved as expected ๏‚— If tests hadnโ€Ÿt passed, would have modified the method and run the tests again
  • 14. Practical Example โ€“ Refactoring contโ€Ÿd ๏‚— Steps taken to complete code changes in Revision r3915: ๏‚— (REFACTOR) โ€“ Cleaned up code to use the refactored changes ๏‚— Changed the code in โ€žcheckDefaultedNameConflict()โ€Ÿ method so the new method was being used ๏‚— The figure below shows the refactored code in green
  • 15. Conclusion ๏‚— The TDD process integrates very well with the distributed nature of development on an open- source project. ๏‚— By adhering to TDD principles, contributors to the Umple project are ensuring that the code is reliable and maintainable, and are making it easier for new developers to contribute in the future.