Re:Ask HN: Help me start using test-driven design and develo...
by sheraz on Sunday May 03, 2015 @02:29PM
(#9482399)
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).
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).