2 Comments
⭠ Return to thread

From TestDesiderata.com, tests should be insensitive to structural changes but sensitive to behavior changes. This is more of a design problem than a testing problem.

Controllability for me is about making the state of a computation explicit. If my code has an if statement that depends, implicitly, on data stored in another service, then I can't easily control the code. If at some level of the code that data is passed explicitly as a parameter to a function, then I can control that part of the computation.

I'm not sure I answered your question. Please ask more.

Expand full comment

Thanks for your insights, Kent. The distinction you draw between unchanging tests and controllability is illuminating, and I appreciate the nuanced approach of the test Desiderata as compared to simply stating "strive for unchanging tests."

Your perspective on controllability brings to mind the interplay between data and interface. It seems to me that if a data structure already adequately abstracts the underlying dependencies, it could serve as the ideal point of balance between abstraction and concreteness, thereby enhancing controllability. However, in the absence of such a data structure, relying on an interface might be the necessary course of action.

In your experience, what are some guiding principles or considerations when deciding between data and interface for enhancing controllability?

Expand full comment