Monday, October 24, 2011

bad tests

bad tests are worse than no tests, and it's better to have no tests than to have tests designed to pass


there it is, I've said it publicly

4 comments:

  1. ...but good perl developers always test well :-)

    Only Java developers omit tests like in this project: https://github.com/projectwonder/wonder -- 2800 class files and just 56 test-units. Usually here, commits that fix bugs do not contribute to the test suite -- typically perl projects do a better job!

    ReplyDelete
  2. #!perl
    use Test::Simple tests => 1;
    ok(1);

    ReplyDelete
  3. I'm sorry but HUH? how are bad tests worse than no tests? and what is a bad test? (maybe I just don't know how to write them)

    ReplyDelete
  4. for example, evil are those that test only the success

    other evil tests are those where you directly input the initial data, then test a class or a method or a script on them: those break when the applications changes and the input data is changed, but you never find out and enjoy the rows of OKs, or you have to fix them all the time

    ReplyDelete