Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Migration and Testing (EVO 2008)

917 views

Published on

I used this set of slides for a lecture I gave at the University of Bern on Dec 4, 2008.

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Migration and Testing (EVO 2008)

  1. 1. Testing and Migration Tudor Gîrba www.tudorgirba.com
  2. 2. fo rw g rin ar ee d gin en gin en ee se rin erv g re { { { { { { } { { } } restructuring } } } { } } }
  3. 3. { { { { { { } { { } } restructuring } } } { } } }
  4. 4. Testing and Migration
  5. 5. Why test?
  6. 6. Many legacy systems don’t have tests
  7. 7. Many legacy systems don’t have tests Customers pay for features, not tests
  8. 8. Many legacy systems don’t have tests Customers pay for features, not tests You can’t test everything anyway
  9. 9. Many legacy systems don’t have tests Customers pay for features, not tests You can’t test everything anyway Testing is akin to street-cleaning
  10. 10. Many legacy systems don’t have tests Customers pay for features, not tests You can’t test everything anyway Testing is akin to street-cleaning Real programmers don’t need tests
  11. 11. Write tests to enable evolution
  12. 12. g fram ework Use a testin setUp assert tearDown
  13. 13. Grow your test base incrementally
  14. 14. Test the interface, not the implementation
  15. 15. Record business rules as tests
  16. 16. Write tests to understand
  17. 17. g fram ework Use a testin setUp assert tearDown
  18. 18. ult to set up diffic But, le gacy is setUp assert tearDown
  19. 19. aModel aStorage aClass add(aClass) store(aClass) setModel(aModel)
  20. 20. aModel aStorage aClass add(aClass) store(aClass) setModel(aModel) 6 casse etal 200 Du
  21. 21. Testing and Migration
  22. 22. Migration is a restructuring that changes the underlying infrastructure
  23. 23. 1989
  24. 24. Big-bang migration often fails
  25. 25. Big-bang migration often fails Users hate change
  26. 26. Big-bang migration often fails Users hate change You need constant feedback to stay on track
  27. 27. Big-bang migration often fails Users hate change You need constant feedback to stay on track Users just want to get their work done
  28. 28. Big-bang migration often fails Users hate change You need constant feedback to stay on track Users just want to get their work done The legacy data must be available during the transition
  29. 29. Involve the users
  30. 30. Build confidence
  31. 31. Conserve familiarity
  32. 32. Migrate incrementally
  33. 33. Prototype the target solution
  34. 34. Throw-away vs. evolutionary prototypes
  35. 35. Always have a running version
  36. 36. Test after every change
  37. 37. Use the profiler before optimizing
  38. 38. Data needs to be preserved and available
  39. 39. :Legacy System :Legacy Storage
  40. 40. :Legacy System :New System :Legacy Storage :New Storage
  41. 41. :Legacy System :New System :Bridge :Legacy Storage :New Storage
  42. 42. :Legacy System :New System :Bridge :Legacy Storage :New Storage
  43. 43. e new town a bridg e to th Make :Legacy System :New System :Bridge :Legacy Storage :New Storage
  44. 44. Present the right interface
  45. 45. Public vs. published interface
  46. 46. Component service()
  47. 47. Component service() replacingService()
  48. 48. te inte rfaces te obs ole De preca Component service() replacingService()
  49. 49. te inte rfaces te obs ole De preca Component service() replacingService()
  50. 50. Component replacingService()
  51. 51. ange? on-breaking ch or n reaking Is it a b Component service() replacingService()
  52. 52. o refac torings nges are due t eaking API cha 80% of br Component service() replacingService() 6 n son 200 Dig, Joh
  53. 53. Client, v1 Component, v1
  54. 54. Client, v1 Component, v1 Component, v2 store changes
  55. 55. replay changes Client, v1 Client, v2 Component, v1 Component, v2 store changes 7 Dig etal 200 e tal 2007 Denker
  56. 56. Don’t jump. Walk with little tested steps
  57. 57. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/

×