views:

1064

answers:

8

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?

+4  A: 

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.

Mac
+2  A: 

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

borjab
+5  A: 

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.

darreljnz
A: 

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

GregW
A: 

I cannot find ounit anywhere. Does someone has it in hist archive somewhere?

Sean McMillan
+1  A: 

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...

romaintaz
looks very interesting
Matthew Watson
+1  A: 

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).

Raimonds Simanovskis
A: 

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

FerranB