Most database tests can be described in a simple way – verify that a field meets the specified requirements and if it does, the test passes. All such tests have a unified way to state expected results – either the fields are always equal or they’re not. These tests can be automated. This course aims towards this automation. We will learn the basics of PL/SQL – a procedural extension of Oracle SQL – and show how it can be used to run tests in a loop, verify the query results against expected outcomes and log the test runs. This will allow the tester to run a script in the evening and check the results in the morning, verifying reported incidents.
We will learn how to modify existing tests so they can be automated, import them into database and create a procedure and several auxiliary functions that will run specified tests one after another until all are completed. The procedure will log the results of each test into a logging table along with timestamps, whether the test passed or not and if it failed, for how many rows it did.
This course is very technical. Most basic and some advanced SQL techniques are required. Knowledge of basic query structure, subselects, and the basic types of joins will be assumed. Knowledge of DML and DDL commands will be useful but not necessary as we will go over the important ones. Previous programming experience is not necessary at all.