SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

teaching:labs:xp:2004b:talktestdrivenrefactoring [2018/05/09 01:59] (current)
Line 1: Line 1:
 +
 +=====  Andreas T.'s [[talks|talk]] about Test Driven Refactoring =====
 +
 +
 +
 +
 +
 +====  The slides are now available: ​ ====
 +{{doc.talk-test-driven-refactoring.ppt|Talk-Test-Driven-Refactoring.ppt}}
 +====  Quick Summary ====
 +
 +=== We detected four Types of refactoring:​ ===
 +
 +Depending on the modifications on the interfaces of the refactored tested classes.
 +
 +
 +
 +
 +^ Compatibility ^ Example ^ How to handle| ​
 +| Compatible |  split temporary variable | no need to update tests| ​
 +| Backwards compatible | pull up field | add aditional tests| ​
 +| Can be made backwards compatible | rename method | mark the old interface as deprecated\\ ​ add aditional tests| ​
 +| Incompatible refactorings | hide method | | 
 +===  Smells we detected in Unit Tests ===
 +
 +Refactorings in the test code and in the base code that might resolve this smell.
 +
 +
 +
 +
 +^ Smell             ^ Refactoring of test code ^ Refactoring of base code| 
 +| Mystery Guest      | Inline Resource ​          | | 
 +| Recource Optimism ​ | Setup external resources ​ | | 
 +| Test Run War       | Make Resources Unique ​    | | 
 +| General Fixture ​   | Extract Method ​           | | 
 +| Eager Test         | Extract Method ​           | | 
 +| Lazy Test          | Inline Method ​            | | 
 +| Assertion Roulette | Add Comments ​             | | 
 +| Indirect Testing ​  | Extract Method / Move Method|not enough data hiding!| ​
 +| For Testers Only   | Extract Method / Move Method| !| 
 +| Sensitive Equality | Introduce Equality Method | | 
 +===  Smells in production code we discussed ===
 +
 +  * Duplicated Code
 +  * Long Method
 +  * Large Class
 +  * Long Parameter List
 +  * Divergent Change
 +  * Shotgun Surgery
 +  * Switch Statements
 +  * Lazy Class
 +  * Speculative Generality
 +  * Alternative Class with Different Interfaces
 +  * Data Class
 +  * Refused Bequest
 +  * Long comments
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +====  Resources ====
 +
 +  * Arie van Deursen, Leon Moonen: [[http://​homepages.cwi.nl/​~leon/​papers/​xp2002/​|"​The Video Store Revisited - Thoughts on Refactoring and Testing"​]],​ In: Proceedings of the 3nd International Conference on Extreme Programming and Flexible Processes in Software Engineering XP2002, 2002, M. Marchesi and G. Succi.
 +  * A. van Deursen, L. Moonen, A. van den Bergh, and G. Kok. [[http://​homepages.cwi.nl/​~leon/​papers/​xp2001/​|Refactoring test code.]] In M. Marchesi and G. Succi, editors, Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering (XP2001), pages 92-95, May 2001.
 +
 +
 +
 +
 +====  Additional Resouces (to find some explanations) ====
 +
 +  * [[http://​www.refactoring.com/​catalog/​index.html|Fowler'​s Refactoring Catalog]]
 +===  About Test Driven Development ===
 +
 +  * K. Beck. Aim, fire: Kent Beck on test-first design. IEEE Software Community Chest, 18(5), September/​October 2001. [[http://​www.computer.org/​software/​homepage/​2001/​05Design/​index.htm]]
 +  * [[http://​c2.com/​cgi/​wiki?​TestDrivenDevelopment]]
 +  * [[http://​www.informatik.uni-bonn.de/​III/​lehre/​vorlesungen/​SWT/​SS2002/​refactoring/​material/​K2.3-refactoringUndTests.pdf|Slides from the lecture in SS2004 (in german) ]]
 +===  Quality Checks for JUnit Tests ===
 +
 +  * I. Moore. [[http://​jester.sourceforge.net/​|Jester a JUnit test tester]]. In M. Marchesi and G. Succi, editors, Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering (XP2001), pages 84-87, May 2001.
 +  * [[http://​www.scoop-gmbh.de/​scoop/​downloads.htm|CC4J - Code Coverage fuer Java Applikationen]] based on [[http://​roots.iai.uni-bonn.de/​research/​jmangler/​|JMangler]]
 +
 +
 +
  
teaching/labs/xp/2004b/talktestdrivenrefactoring.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2020