Stephen posted this in the Slack channel and kindly agreed to it also being shared here to get a greater range of answers:
“So, heres a thought for discussion -> Automated Testing. How do you avoid duplication of development work (ie by basically writing the same code to test the function as the function itself) and is it sometimes worth doing that anyway?”
He started with a response to the second part:
“I think so sometimes. I’ve just been testing an API function that was a 40 odd cell column of options/combinations (comprising about 4k permutations of inputs) with caveats that forced you down or right a column . I wrote it as a 400 odd line if statement and found that we had differing outputs on about 200/4k (5%) where we had interpreted the spec differently due to previously unnoticed spec ambiguity”
Some interesting replies so far, the highlight being a general consensus that individual functions should be covered by unit testing and behaviours should be focused on by testing.
What are your thoughts on this?