Introduction to utPLSQL¶
utPLSQL is a Unit Testing framework for Oracle PL/SQL. The framework follows industry standards and best patterns of modern Unit Testing frameworks like JUnit and RSpec
- User Guide
- Reporting
- Cheat-sheet
- About
Demo project¶
Have a look at our demo project.
It uses Travis CI to build on every commit, runs all tests, publishes test results and code coverage to SonarQube.
Three steps¶
With just three simple steps you can define and run your unit tests for PLSQL code.
- Install the utPLSQL framework
- Create Unit Tests to for the code
- Run the tests
Here is how you can simply create tested code, unit tests and execute the tests using SQL Developer
Check out the sections on annotations and expectations to see how to define your tests.
Command line¶
The ut_run
(for linux/unix) and ut_run.bat
(for windows) are simple yet powerful.
They can provide output from the tests on the fly.
You can also use it to have coloured outputs.
Look into utPLSQL-sql-cli project to see more.
Coverage¶
If you want to have code coverage gathered on your code , it's best to use ut_run
to execute your tests with multiple reporters and have both test execution report as well as coverage report saved to a file.
Check out the coverage documentation for options of coverage reporting
Created: October 23, 2016 20:53:00