3 ms·
We should move towards application architectures that allow recording app behavior in a reproducible way. If every application had the ability to record input,
by worldsayshi 8y ago
We should move towards application architectures that allow recording app behavior in a reproducible way.
If every application had the ability to record input, output and state for a given interaction then reproducibility wouldn't be such a huge burden.
Is this really a pipe dream?
- setr 8y agoHow do you know what level of state matters? Eg a pure function just needs to track the function’s inputs and outputs; an impure function relying on class-globals has to track class state, an impure function on true-globals has to track full program state, an impure function modifying the filesystem has to keep track of fs state, etc. And if you try to track more state than you need, then you end up with say 40 test cases for each permutation of config env variables that aren't actually relevant to the function in question, because users generating the test suite were on different machines/environments. And if you santize the environment, ensuring its always the same, and specify exactly what should be tracked... you’re just back to handwritten tests
- zoul 8y agohttps://guide.elm-lang.org/ https://guide.elm-lang.org/
- setr 8y agoAfaict on a quick skim, the elm guide makes no reference to testing, and other than fully specifying your dependencies with only pure functions, doesn’t seem to resolve the question of minimal state to generalize a test. Html might be inherently simpler because the total output state is simpler (just the html), but then you have things like caching, cookies, browser versions, etc, which elm does not appear to capture in its dependencies So.. whats the relevance to this conversation?
- zoul 8y agoElm has a time travelling debugger and the ability to dump all the state transitions and replay them elsewhere, for example to reproduce a bug. Seems relevant to me.