Today I want to talk about a special kind of tests: Verification tests.
What do we want from our tests? Not a lot, really. We just want to know that everything’s ok (when they pass), and when they fail – that there’s something wrong (and hopefully where).
When our tests find something wrong, we hope that it’s something we can fix. If not in the code, then in the underlying framework. If not there, in the database. Somewhere deep in our code.
With this kind of failure, we know what to do – go in, find the leak and plug it.
Imagine our surprise then, if we go in, and what we find, is that the server didn’t connect to the database. Or that it did, but there’s no data in there. Or that the wrong framework version is installed. On the wrong operating system.
Wouldn’t that be embarrassing?
The real problem is, we’re wasting time on the investigation. We shouldn’t find out about these problems when our functional tests run.
We want to find out before they run.
Enter Verification Tests
That’s what verification tests are for. They run before any suite of tests, and make sure that the functional tests are ready to be run. That when they fail, it’s not going to be a deployment problem, but a functional problem. Just as we like. Or expect.
Verification tests can run for any type of tests. they can check that a server is up, before running API tests. They can check that a browser of a certain version is installed, before running any UI test.
They can also check, that the server can talk to the database, and that it is set up with the right data and permissions, and that all containers are up and running.
And when all the verification tests pass, then we can run our functional tests. Then we’d know that when they fail, there’s a real problem.
Verification tests save us time. You can write them in whatever language you’re used to. And mostly, they are easy to write. They can save you a lot of time.
What I can’t guarantee, is that what the functional tests find – that it won’t be embarrassing.
For more information on verification tests, check out my “Automation Tests Workshop“. Verified for success.
0 Comments