Running utPLSQL unit tests - dbFlux (7/9)published on
utPLSQL is the UnitTesting tool for Oracle databases. utPLSQL is OpenSource and you can find it here: https://www.utplsql.org
dbFlux supports working with utPLSQL and offers two commands for this purpose. You can run tests for the currently opened test package and you are able to run tests for one or more schemas.
dbFlux expects tests in the directory
db/<schema>/tests. Since tests are actually written inside packages, this is the only used subfolder here.
If I have opened a package in the test folder, I can run a test with the command
dbFlux: Execute utPLSQL test with current Package or with the shortcut
In the terminal dbFlux respectively utPLSQL displays the relevant output of the tests. In addition, this output is displayed again in a separate window.
With the command
dbFlux: Execute utPLSQL tests or with the shortcut
Shift+Alt+T dbFux asks you for which schema the tests should be executed. Then these tests are executed one after the other.
Especially when developing test driven, dbFLux offers a fast way to run all tests of all schemas. In many projects I got used to test not only use cases, but also certain quality features. For example, there must be no invalid objects, for tables with certain columns there must be a VPD policy, for APEX pages there must be an authorization in each page, and so on....
List of the single articles of this series
1. Initialize Workspace
2. Create Database Objects
3. Configure Custom Trigger Runs
4. Modify Table
5. Compile Source Code
7. Execute utPLSQL Unittests