8 votes

The high cost of slow tests

2 comments

  1. [3]
    Comment deleted by author
    Link
    1. aphoenix
      Link Parent
      I think that if the article spent time on that, it would be a bit fractured, and miss its intended mark; this is something actionable that one could show to one's boss to support "we need to...

      I think that if the article spent time on that, it would be a bit fractured, and miss its intended mark; this is something actionable that one could show to one's boss to support "we need to rewrite the test suite" without bogging the boss down in too much technical jargon.

      That said:

      • testing hierarchies are important
        • tag your tests
        • group tests appropriately by what they're testing
        • don't do excessive setup / teardown; if you can use setup for multiple tests, do so
      • don't run all your tests most of the time
        • only run the tests on the class you're coding
        • run the full test suite at least once before a build
      • don't test things that libraries you use already test
        • seriously, a lot of libraries already test the crap out of things
      • time your tests so you can see which ones are problematic

      This isn't an exhaustive list by any means; it's just off the top of my head.

      5 votes
    2. mrbig
      (edited )
      Link Parent
      It works like this: I've typed this function two times in the last three hours. This is unacceptable. I better make a snippet for it. Where should I put the tabstops? Can I make the autocompletion...

      It works like this:

      1. I've typed this function two times in the last three hours. This is unacceptable. I better make a snippet for it.
      2. Where should I put the tabstops?
      3. Can I make the autocompletion work inside the active snippet minor mode?
      4. This StackOverflow answer should be working... Maybe I'm using an old version. Better compile Emacs from source
      5. How the fuck do I install xlib.h on Debian Stretch?
      6. I should have made a macro...
      7. Why this macro doesn't work with Evil?
      8. Holy shit, it's been three hours already? I don't even remember what I was doing...
      9. Well, my modeline looks wonky, I better go fix it...
      1 vote