News for hackers. Stuff that matters.
Re:Software Test Desiderata by kissgyorgy on Sunday October 20, 2019 @06:20PM (#21307646)
I have been a big advocate for testing only the public interface of your code, but sometimes you can't just avoid it, when you have a really complex piece of function, you got to test it to gain confidence. Other than that, I hope these are not a surprise for anybody who is writing tests on a daily basis.
Re:Software Test Desiderata by ptx on Monday October 21, 2019 @06:32AM (#21310714)
Kent Beck said on a podcast (discussing TDD with David Heinemeier Hansson) that he sometimes writes tests coupled to the implementation details as he's developing, but later (if it seems like a maintenance burden) he will delete those tests.
Re:Software Test Desiderata by ncmncm on Monday October 21, 2019 @08:01PM (#21318956)
There's no shame in making public interfaces just for test access. You can change them freely, along with the tests, if needed, if you have given them scary names; or even delete them and the tests that use them, if warranted.

In the hardware world they call this "design for test" and reserve pins or connectors just to attach test jigs to.

I have encountered reviewers who were horrified at the idea, but I just laughed.