Linked Questions

241 votes
9 answers
40k views

I find tests a lot trickier and harder to write than the actual code they are testing. It's not unusual for me to spend more time writing the test than the code it is testing. Is that normal or am I ...
springloaded's user avatar
  • 2,163
145 votes
11 answers
58k views

Some people maintain that integration tests are all kinds of bad and wrong - everything must be unit-tested, which means you have to mock dependencies; an option which, for various reasons, I'm not ...
mindplay.dk's user avatar
  • 1,707
14 votes
6 answers
8k views

I am curious whether there are metrics on whether code coverage actually improves code quality? Any research studies? If so, at what percent does it become a case of diminishing returns? If not, why ...
AngryHacker's user avatar
13 votes
9 answers
10k views

When I have to implement a new feature or fix a bug, I usually try to recreate the situation with a test. I sometime spend around 3 hours coming up with fixtures and writing the test. The actual ...
Thierry Lam's user avatar
  • 1,118
8 votes
7 answers
2k views

People say that "talking about TDD hardly works, if you want to convince someone to TDD, show them results". However, I'm already getting great results without TDD. Showing me that people who use TDD ...
Kylee's user avatar
  • 127
15 votes
4 answers
2k views

Our organization is considering integrating unit testing into our software development workflow. I've heard lots of anecdotal stories about how it encourages better, easy to maintain, and well-planned ...
Adam's user avatar
  • 271
4 votes
4 answers
825 views

We're outsourcing some work to an external developer, so I'm busy writing up a contract about what constitutes a deliverable. So far I require that the code is shipped with automated tests. But, ...
realworldcoder's user avatar
4 votes
5 answers
546 views

Boss in upper management is demanding to know why code reviewers are attempting to reproduce the problem & solution (in the case of defects) and solution (in the case of features) for reasons of ...
Wes's user avatar
  • 335
1 vote
3 answers
4k views

Our project have a lot of layers, Entities Repositories UnitOfWorks Domain Services (Business Logic) Validation Infrastructure Application Services etc.. We are only writing unit tests for ...
Joe Gage's user avatar
0 votes
6 answers
269 views

Loose coupling promotes testability because it allows components to be tested in isolation without having to test the entire system. This can help to reduce the risk of introducing new bugs by making ...
Arunabh's user avatar