News for hackers. Stuff that matters.
Re:How we took our tests from 100 seconds to 100ms by DannoHung on Tuesday July 21, 2015 @02:50PM (#9924745)
In my experience building backend apps, unit tests are way more effective at catching logic bugs than end to end tests.

End to end tests are great for catching connectivity bugs though.

Re:How we took our tests from 100 seconds to 100ms by reverius42 on Tuesday July 21, 2015 @02:59PM (#9924826)
UIs tend to have a ton of connectivity and little logic/computation.
Re:How we took our tests from 100 seconds to 100ms by michaelmcmillan on Tuesday July 21, 2015 @03:30PM (#9925057)
An added benefit of using unit tests over integration tests is that unit tests shows you what went wrong very clearly. If an integration test fails I have literally no idea where to start hunting for the bug. It could be located at any level in the stack.

I highly recommend this brilliant talk by J.B Rainsberger on how integration tests are a scam: https://vimeo.com/80533536

Re:How we took our tests from 100 seconds to 100ms by specialk on Tuesday July 21, 2015 @06:31PM (#9926335)
If you don't have that much time to write tests I'd recommend integration tests. Then at least you have some tests. Treat integration tests as smoke tests. If there is smoke then you can start looking for the fire. Integration tests are always better then no tests at all. At least they tell you there is a fire even if it is vague in telling you where it is.
Re:How we took our tests from 100 seconds to 100ms by michaelmcmillan on Tuesday July 21, 2015 @07:36PM (#9926675)
As someone who always writes unit tests before any production code, I don't know how I would have the time to not write tests. It drives the design and reduces time debugging by a ridiculous amount. I work with information systems though, might be different for other fields.
Re:How we took our tests from 100 seconds to 100ms by lmm on Wednesday July 22, 2015 @06:59AM (#9928817)
Since I've switched to a language with a richer type system (Scala) I've found a lot of what I used to do with unit tests can go into the type level instead (see e.g. http://spin.atomicobject.com/2014/12/09/typed-language-tdd-p... - but in Scala the techniques are a lot less verbose to apply).
Re:How we took our tests from 100 seconds to 100ms by michaelmcmillan on Wednesday July 22, 2015 @07:19AM (#9928895)
I am most familiar with Javascript & Python, but I think you're onto something having fiddled with Java for 6 months or so. Some logic obviously can't be replaced with only a rich type system, but a lot can.