Unit testing is a process in software development that makes it possible to check for errors in the various components or modules of the software. In databases, those components are stored procedures, functions, triggers, and so on. A view definition, or even a code of queries that applications use, can also be an object for unit testing.
The idea behind unit testing is that for every module of a software system, like class or function, there is a set of tests that invokes that module with a certain input data and checks whether the outcome of the invocation matches the expected result. When a module being tested needs to interact with other systems, those systems can be emulated by the test framework so that the interaction can also be tested.
The set of tests should be big enough to cover as much of the source code of the tested module as possible. This can be achieved...