Add and run tests

Save read-only tests of your keys, run them whenever you like and see what changed since a test last passed.

In short

A check asks one read-only question - does a key exist or is it gone, does it hold this value, type, length, hash field or JSON value, does it expire in time, how many keys match a pattern, are the server's memory and hit rate inside their limits, and does the cache say the same as your database. Save tests on a connection and run them whenever you like; a failed test shows what changed since it last passed.

Before you start

Add a test and run tests

  1. Pick the connection, open the "Tests" tab and press "Add test" - or open the Tests section's menu and choose "Suggest tests" to add the tests your server's keys, memory and hit rate call for. Suggestions are worked out by rules, so they cost no AI.
  2. Name it, give the key and its database, and choose what the key should be.
  3. Press "Add and run": the test is saved, runs at once and its result opens.
  4. Later, press "Run N tests": the run goes to the background and a bar above the tests shows how far it is. Press "Cancel" on it to stop after the test it is reading; the tests that ran are kept. When it ends you are told how it went, with "Open run".
  5. Press "Run" on one row to run that test at once, or tick several rows to run, switch on, switch off or delete them together.

What changed since it last passed

A failed test is set beside the last time that same test passed, not only the previous run. The panel names what differs: the key went missing, its type or value changed, or it started or stopped expiring. A time to live that only counted down is not a change. A check that never passed has nothing to compare with.

Good to know

Run on a schedule

Gate a pipeline on the tests

Your build pipeline can run the connection's tests and stop when one does not hold. {{brand}} runs them on its own queue, the same as Run all, so no cache address or password is in the pipeline.

If something goes wrong

Related