Tutorial :Unit testing for PL/SQL [closed]


Anyone have any experience or tools for unit testing PL/SQL. The best looking tool I've seen for this seems to be Quests Code Tester, but i'm not sure how well that would integration with continuous integration tools or command line testing?


I use utPLSQL as the framework and OUnit as the client. utPLSQL isn't really meant to be used by itself, a good graphical client is required. OUnit is the predecessor to Qute. Qute is also a good tool but more complex than my requirements - it allows you to construct tests using a GUI and does good stuff like test code generation.

Edit: My understanding is that utPLSQL stores all results in database tables, including all historical results which would make a good data source for gathering statistics for continuous integration. You can also define test groups so a single call to utPLSQL can call multiple test packages.


Check utPLSQL out. I found it somewhat difficult to start with, but i think it does the job reasonably well.

As for continuous integration tools, I used to create usual tests (NUnit, C#) that just called the stored procedures created with utPLSQL and checked their result out.


I have created and using PL/SQL unit testing framework using Ruby library ruby-plsql.

It provides much shorter and more readable tests than utPLSQL and gives more flexibility compared to GUI tools (like Quest Code Tester or SQLDeveloper 2.1).


There are a few listed on the wikipedia : http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#PL.2FSQL


The last version of SQL Developer includes an Unit Test suite very interesting.


I found this interesting post about the continuous integration for PL/SQL projects.

It meanly deals with the unit testing of PL/SQL code, using the previously listed utPLSQL framework...


I'm using python py.test with cx_oracle to build test scripts for pl/sql packages. Works nice so far.


I've recently used successfully unit testing framework of PL/SQL Commons toolkit (see also author's slides). The toolkit is not yet publicly available (at the time of the writing) but if you drop an email to the authors you'll get a working package (or at least I got).

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »