Hacker News new | ask | show | jobs
by collyw 4530 days ago
"If you're struggling to write tests, and they're hard to write, messy, take a lot of setup, are slow to run, too tightly coupled etc. you have a design problem."

This is my problem exactly, and I wouldn't say I have a design problem. My application is a Django app that return complex database query results. Creating the fixtures for ALL of the edge cases would take significantly longer than writing the code. At this stage it is far more efficient to take a copy of the production database and check things manually. It helps that my app is in house only, and so users will report straight away when something isn't working.

But to say that I have a design problem because tests are going to be difficult to implement is just plain wrong.

1 comments

sure... it can be more broadly stated "you have a design problem and/or you're testing the wrong things"