See what changed since a test last passed
How SQL Tester compares runs and flags drift without any check.
In short
When a saved test fails, the result shows what changed since the last run that passed in the same environment. Even without checks, every run is compared with its last passing run, and a change is flagged as drift.
Before you start
- Who: anyone who can open the project (View).
- Plan: every plan; nothing to set up.
- First: the test must have passed once in the same environment.
Read what changed
- Open the failed run.
- Read "Changed since the last passing run": the error, and each check that turned from pass to fail with its value then and now.
- Read what else differs: the statement, parameters and transaction mode; columns, rows, rows affected, return value and output parameters; a much slower run or a different server version.
- Open the History tab to see drift across the project under What changed.
Drift without checks
Good to know
- The comparison is with the last passing run, never merely the previous run. A Scratchpad run is compared with the last time you ran the same statement there and it passed.
- Drift is a hint, not a failure: it never changes the verdict. Runs that raised an error are not compared.
- Values appear as the run stored them, so a masked parameter stays masked.
- The comparison uses a fingerprint of the captured rows, so it works although no rows are kept.
- Clearing old runs never removes the newest passing run of a test in each environment.
- To make a change fail the test, add a check such as Column exists.
Related
- /help/sql-tester/assertions
- /help/sql-tester/insights
- /help/sql-tester/what-a-run-keeps