DEV Community

Discussion on: What were your problems with "real world TDD"?

Collapse
 
hudsonburgess7 profile image
Hudson Burgess

"expect it to take way longer than you think initially" -- definitely agree with Blaine on that one

I think the biggest lesson I've learned recently is to actually listen to your testing pains instead of ignoring them. When I find tests hard to write, it's usually for one of a few reasons:

  • I don't know the framework well enough, in which case I do some research and get better at writing tests in the future.
  • I wrote sub-standard code, in which case I refactor it and end up with a generally cleaner code base.
  • I wrote code before the tests, in which case I usually scrap said code and rewrite it for clarity (assuming I wrote the code; I rarely do this with code that someone else wrote).
Collapse
 
n_develop profile image
Lars Richter

I think the biggest lesson I've learned recently is to actually listen to your testing pains instead of ignoring them.

That is so true. That quote will definitely make it into my blog posts, if it's ok for you. :-)