

Ask HN: Help me start using test-driven design and development “in anger” - 271441

I&#x27;ve been programming a long time, so I&#x27;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 &quot;testing frameworks&quot; and &quot;Unit Testing Libraries.&quot;  As a result I really don&#x27;t know how to get started, &quot;properly,&quot; with TDD.<p>Where do I start?  What tutorial should I work through?<p>For the purposes I would guess the language I&#x27;d have to start with would be Python.<p>Help?
======
i0nutzb
In order to do efficient TDD, you need to be fairly familiar with the SOLID
principles.

I 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](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](https://code.tutsplus.com/courses/solid-design-patterns)

2) [http://www.jamesshore.com/Blog/Lets-
Play](http://www.jamesshore.com/Blog/Lets-Play)

3) Clean Coders Series ( [http://cleancoders.com/](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...](https://code.tutsplus.com/tutorials/beginning-test-driven-development-
in-python--net-30137)

~~~
271441
Thanks - I'll check them out.

------
sheraz
I feel you. Only last year did I really embrace testing.

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).

