3 ms·
I agree. I think it's important that your test suite gives you something useful with every test, instead of writing a bunch of pointless extra tests just to get
by ufmace 8y ago
I agree. I think it's important that your test suite gives you something useful with every test, instead of writing a bunch of pointless extra tests just to get to 100% coverage because you read somewhere that that's good.
I feel like I ought to write more on this one of these days, but I have a few testing pet peeves, as far as tests you shouldn't write. Don't write tests that are a copy-paste of the code you're testing. Don't write tests to validate things that should be proven by your type system and lack of compile/parse errors. Beware of tests so tied to implementation details that they make your code harder to refactor. Don't write tests for things talking to external services - the only real test is that it correctly handles the actual service responses.
- ChristianGeek 8y agoTests should be testing behavior, not implementation (this was the original intent of unit testing but it got sidetracked over time).