Ask HN: Help me start using test-driven design and development “in anger”
I've been programming a long time, so I'm not a novice and writing code from a blank screen, making it work, and deploying it in the real world. But I was around before things like "testing frameworks" and "Unit Testing Libraries." As a result I really don't know how to get started, "properly," with TDD.
Where do I start? What tutorial should I work through?
For the purposes I would guess the language I'd have to start with would be Python.
Help?
3 comments
[ 2.1 ms ] story [ 15.6 ms ] threadI saw at least one book on O'reilly about TDD-ing in Python, but I can't really tell how good they are, since I don't do Py myself: http://chimera.labs.oreilly.com/books/1234000000754
However, if you are willing to invest few hours for watching TDD in other languages, I could recommend you these stuff:
1) https://code.tutsplus.com/courses/solid-design-patterns
2) http://www.jamesshore.com/Blog/Lets-Play
3) Clean Coders Series ( http://cleancoders.com/ ) - there are only few episodes strictly on TDD, but there are a lot of how and why on design patterns, principles and so on. (I'm doing PHP/JS, but I found Clean Coders - mostly Java - very helpful)
I just found this: https://code.tutsplus.com/tutorials/beginning-test-driven-de...
But I did it from what I call "outside-in".
That is, I started with acceptance tests and then worked my way down to unit tests. Search for "Accept Testing Driven Development."
Mostly my tools are Selenium for single page web apps that and codeception (php) for testing my APIs.
I find this method works well for me because it helps me to find the areas that actually needed the most testing. I didn't spend time writing unit tests for areas of code that were used only 1% of the time.
Also, it gives me a better understanding of how to bootstrap the entire infrastructure, which helps for setting up different environments (dev, staging, production).