3 ms·
The is how I’ve developed code for almost a decade. For a given test we have the following behavior triple: desired result, expected result, and observed result
by thechao 8y ago
The is how I’ve developed code for almost a decade. For a given test we have the following behavior triple: desired result, expected result, and observed result. A test fails if it’s expected result differs from the observed result. The set of development work is every place the desired & expected results differ. The CI is passing when no test changes behavior. There’s a revert “window” where a change-in-state can be blessed.
- Something1234 8y agoWhat's the difference between a desired and expected result?
- thechao 8y agoDesired is what you want to happen, expected is what you expect to happen, and observed is what happened with the current run.
- XorNot 8y agoFrom the perspective of a test that only passes or fails, this doesn't gain you anything. I suppose we could imagine a test system which includes more metadata, and allows for placeholder values to let tests pass while producing an annotation that the product is not production ready.
- zahrc 8y agoWinning lottery is your desired result. Not winning it is your expected result.