24

I've seen the question (and answer) when posed for MS SQL Server, though I don't yet know of one for Oracle and PL/SQL. Are there xUnit style testing frameworks for Oracle's PL/SQL? What are they?

1

10 Answers 10

15

The most commonly used is probably utPLSQL

The original author of this toolkit now works for Quest, which has a commercial PL/SQL unit testing application.

14

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

11

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

3

PLUTO appears to be very new, and there doesn't appear to be a lot of documentation. So I would be concerned that you'd be working through a decent number of bugs to get things working. utPLSQL has been around for a number of years and pretty widely deployed, so there have been a lot more bug fixes and a lot more people who can help out if you run into problems.

Additionally, and not to disparage anyone, but Steven Feuerstein, who wrote utPLSQL is one of the most recognized PL/SQL experts in the world. While I'm sure the author of PLUTO is a perfectly competent developer, I don't believe he has anywhere near the reputation Steven has.

4
  • 1
    You could ask him youself :) stackoverflow.com/users/12731/josh-mcadams Oct 15, 2008 at 1:42
  • My only issue with utPLSQL is that it seems steven has moved on to Quest, and is doing a utPLSQL thing for money now, which I don't have an issue with, but the windows driven nature of the app turns me off. Oct 15, 2008 at 1:44
  • The Windows-driven nature of the utPLSQL library? Or of the Quest Code Tester application? While Steven isn't (I assume) doing a lot of utPLSQL development these days, there are plenty of other developers working with it that can contribute patches. Oct 15, 2008 at 2:07
  • Quest Code Tester. If it wasn't all driven by a windows application, I might be looking at it, but for the moment its a utPLSQL, haven't had a chance to seriously look at PLUTO ye though Oct 15, 2008 at 9:46
2

I found this question searching for a PL/SQL unit test framework. I've found an article where PLUTO's developer argues for it:

... there are a few products that help PL/SQL programmers test their code. Quest Software has a product called Code Tester for Oracle; however, the free version is cripple-ware and the for-pay version just adds one more obstacle for you to have to get by in convincing your organization to start testing. There is also a utPLSQL project that was abandoned a few years ago and it is starting to suffer from bit rot.

2

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

1

I also found another library: PLUTO - has anyone used these and can compare/contrast them?

1

We use DBUnit. It integrates nicely into a continuous integration tools like Cruise Control, though developers need to learn a little Java. Templates, utilities and code samples helped our pl/sql developers get up to speed quickly.

0

Haven't used any, but last realese of utPLSQL was on July 2005 and since the author is the same from the commercial code tester for oracle (http://www.quest.com/code-tester-for-oracle/) I don't think we'll be seeing much of utPLSQL in the future if any, so I think I'll take my chances with PLUTO (2008)

0

I looked at all of those, but the only one I liked was PLUnit. It does seem to have been abandoned by its maintainers (I had to tweak the scripts to make them install). But the API is extremely simple, and it doesn't try to force an OOP/xUnit approach into PL/SQL.

Not the answer you're looking for? Browse other questions tagged or ask your own question.