Are Unit tests that bad?

Home Forums Software Testing Discussions Are Unit tests that bad?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #9859

    I was chatting to a developer recently  (about testing) and the topic of unit test came up. He says he hates unit tests and try’s to avoid doing them. I started reading about this and it seems that developers do not generally deliver unit tests with their code. Do you think that this is the case?


    Do you hate writing unit testing as much as he does? Or is it just a dev thing?


    I think that unit testing is poorly understood by developers. Many see it as a waste of time, merely an extra proof that their software works

      which of course it does

    For many Unit testing is not attempt to find bugs but a verification using golden path test data that the Software is ready for the next stage.

    Good unit tests make great Automation test cases which is a fact that agile and TDD/BDD teams are picking up on especially if they are using continuous deployment.


    I have seen developers do great unit tests, and in some organisations that’s just how it is. Test driven development, Behavior-driven development up front… Look into the books on how Google and Microsoft tests. (Whittaker and Page, respectively).


    I agree that too many coders don’t believe that they should test their code, and they do so grudgingly and using the happy-path. This is doubly worrying, because that rose tinted view that everything willbe alright will also apply to their code, and the validation, error-handling and associated logic will be underdeveloped. I see exactly this all too often.
    Part of the problem is that we create too-rigid roles in which coders see testing as something that testers do. The truth is that we are all developers with a range of outlooks and skills. But it’s not been developed till it’s been written and tested, and the testing mindset is ESSENTIAL for a ‘coder’ almost as much as it is for a ‘tester’. All too often this is not the case and we get code handed over that cannot handle real life.


    Read “Why Most UnitTesting is Waste” by James Coplien:

    In the ‘Cleanroom Approach to Software Development’, unit testing was considered uneconomical, which it proved to be. – read Allan M. Stavely’s book “Toward Zero-Defect Programming”

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.