Re:Goodbye, Clean Code
by ummonk on Saturday January 11, 2020 @09:24PM
(#22024027)
If you try to abstract away tests, you often just end up re-implementing the same abstractions used in the actual code, and you can end up not catching unfounded assumptions that your abstraction is making in both the tests and the code. There is a scope for having test helpers / utils to make tests easier to write, but you should be minimalist with these.
[ Parent
| on HN ]
I agree, but some test helpers are reasonable. It's about balance and readability of the tests in question. Otherwise integration tests end up being a hundred lines of code.
The problem with abstractions in testing is - you should test it :)