TL;DR
This post is my comment on letter D in S.A.C.R.E.D. mnemonic created by Friendly tester. Comment was triggered by Ben Simo tweet: “If you know the result, then it is a demonstration, not the experiment”. On image we have Tesla coil demonstration, but Tesla did a number of experiments before we got this demonstration.
S.A.C.R.E.D Mnemonic
Richard Bradshaw, aka Friendly Tester, wrote an excellent blog post about S.A.C.R.E.D mnemonic that he created to assist in teaching others about all that’s needed to create deterministic and stable automated tests/checks.
New Whiteboard Testing Video – S.A.C.R.E.D | Friendly Tester https://t.co/EqMrU2Uh0w
— Karlo Smid (@karlosmid) July 3, 2019
What Is Testing?
Testing is not verification. Testing is:
Testing is an empirical process; it gathers evidence about the world. [James Bach]
Experiment Versus Demonstration
If you already know the likely result,
it's a demonstration;
not an experiment.— Ben Simo 🕵️ (@QualityFrog) July 2, 2019
D in S.A.C.R.E.D stands for Deterministic. But when something has known result, it is demonstration, not an experiment. Empirical process is using experiments, where heuristics about the experiment outcome could fail. This is testing. S.A.C.R.E.D. talks about verification, not testing. Verification is important part of testing. Automated checking is usually used to mitigate regression risks in the application.
In order to make automated test deterministic, we first need to do testing to find out the oracle in automated check.
Automation could also be a program that is preparing data for an experiment, or program that exercise application under test that could not be possible to do using application UI. And such program has checks that could fail as part to reveal the evidence about the world. Or does not have any checks because checks are done by tester by observing an application under test.
Conclusion
Testing is human, highly skilled, activity. It is experiment, not demonstration.