Thanks for the article! We don't really have a good smoke testing or UI testing process at my work, so for me, TDD helps to make me feel confident about code I'm pushing to release. It can be really hard, especially setup for tests which run the service layer code. One thing that was helpful for me is that I don't write the whole test first, I start out by writing the function signature with a simple throw NotImplementedException();. THEN I write a test and make sure it runs the function. I go back and fourth in increments not much bigger than this until my function and tests are done. The benefit of this method for me is that I get into a rhythm, I discover edge cases and hidden complexity / considerations early. When I thought that I had to write a whole unit test before starting to write the production code, I would get overwhelmed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article! We don't really have a good smoke testing or UI testing process at my work, so for me, TDD helps to make me feel confident about code I'm pushing to release. It can be really hard, especially setup for tests which run the service layer code. One thing that was helpful for me is that I don't write the whole test first, I start out by writing the function signature with a simple
throw NotImplementedException();
. THEN I write a test and make sure it runs the function. I go back and fourth in increments not much bigger than this until my function and tests are done. The benefit of this method for me is that I get into a rhythm, I discover edge cases and hidden complexity / considerations early. When I thought that I had to write a whole unit test before starting to write the production code, I would get overwhelmed.