testing-concept-refactor-tests

blog-post-safely-refactor-tests#also-code

Test code is still code and should adhere to the same high standards as the code that's running directly in production.

 
podcast-giant-robots-79-uncle-bob#refactor-tests

They talk about test first and the importance of refactoring your tests before you write your next piece of code. It's near the end of the interview.

 
blog-post-throwaway-code#second-failing-test-at-lower-level-in-pyramid

I eventually find the bug, and I'm able to identify the change that needs to be made to fix it. Most devs I've worked with over the years stop there. They have a failing test and a commit that fixes it. Job done. Time to move on. I think this is a missed opportunity. It's hard for me to imagine a bug that can't also be reproduced via a unit test or an integration test. What I prefer to do is to add a second failing test at a lower level on the pyramid, and then make sure that the "fix" I'm applying fixes both the higher-level acceptance test and the lower-level test.

 

Referring Pages

codedtested