Extension for running unit tests straight from SQL Developer
utPLSQL for SQL Developer extends Oracle’s SQL Developer to
In the Connections window, select a connection or one or more packages or package procedures to run utPLSQL tests. Or you can run utPLSQL tests directly from the PL/SQL editor. The test procedures are determined according to the cursor position in the PL/SQL editor.
Select the tests to debug, the same way you would if you were just running them, but select Debug utPLSQL test...
in the context menu.
And then the PL/SQL Debugger is called for the generated, anonymous PL/SQL block.
The initialization timeout for the realtime reporter is increased to 1 hour. The overall timeout is left to the default value of 4 hours. So you have enough time to step through the PL/SQL code and analyse it. Press the Stop
button at any time to cancel the test run.
In the Connections window, select a connection or one or more packages for a code coverage report.
In the dialog you can set some parameters. If you run code coverage for a few chosen packages or from the PL/SQL editor the objects to be included are determined according the object dependencies in the Oracle data dictionary.
Press Run
to produce the code coverage process in the background. You may minimize or close the dialog. To abort the process, press Cancel
.
The HTML report is shown in your default browser.
Select a package, type, function or procedure to build a utPLSQL test package skeleton. The generated package compiles and executes, but still needs some rework.
Create code templates
in the preferencesut_
in the Worksheet or a PL/SQL editor and press Ctrl-Space
to get the list of a utPLSQL code templatesReturn
to paste a code template at the current cursor positionImport utPLSQL snippets for annotations and expectations via the the Import Snippets
button of the utPLSQL preferences dialog.
Insert the snippets by drag & drop into your code.
Annotations are used in the package specification for various test configurations.
Expectations are used in the package body to compare actual with expected results.
Set your preferences to change the behaviour of utPLSQL within SQL Developer.
utPLSQL for SQL Developer implements the OddgenGenerator2 interface to
The use of oddgen for SQL Developer is optional.
utPLSQL can run tests based on suitepaths and suites. The next screenshot shows the generated run command for two selected suitepaths.
Use oddgen to generate utPLSQL test package skeletons. When generating to files, a file for each package specification and package body is created.
Binary releases are published here.
Start SQL Developer
Select Check for Updates…
in the help menu.
Use the Install From Local File
option to install the previously downloaded utplsql_for_SQLDev_*.zip
file.
Start SQL Developer
Select Check for Updates…
in the help menu.
Press Add…
to register the salvis.com
update site http://update.salvis.com/
.
Use the Search Update Center
option and select the salvis.com
update center to install the lastest version of utPLSQL for SQL Developer
.
Please file your bug reports, enhancement requests, questions and other support requests within Github’s issue tracker.
Open a terminal window in the utPLSQL-SQLDeveloper root folder and type
cd sqldev
Run maven build by the following command
mvn -Dsqldev.basedir=/Applications/SQLDeveloper21.4.3.app/Contents/Resources/sqldeveloper -DskipTests=true clean package
Amend the parameter sqldev.basedir to match the path of your SQL Developer installation. This folder is used to reference Oracle jar files which are not available in public Maven repositories
utplsql_for_SQLDev_x.x.x-SNAPSHOT.zip
in the target
directory can be installed within SQL DeveloperutPLSQL for SQL Developer is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.