Oracle Unit Testing

I’m wanting to start doing some unit testing for PL/SQL code I’m contributing to an Oracle database. Most of the existing code is big, unwieldly and entirely unsuitable for unit testing, but I’m hoping that if I can make a start testing new code, then at least that’s something (and who knows, we may be able to refactor some of the old code given enough time!).

In the past, I’ve had some success with utPLSQL. It looks to be a standard xUnit framework, so should be familiar to anyone who’s used anything like JUnit. The biggest problem is that it’s pretty much been abandoned. It still exists on Sourceforge, but other than a few people posting things like bug reports, nothing much has happened for a good few years! It’s a pity, because it works well and has pretty good documentation (even if a few of the links are out of date and no longer work), but could probably just do with a few tweaks to fix a couple of minor bugs. Looking round, it sounds like it’s still the best of what’s available for free.

Has anyone had any experience of unit testing Oracle PL/SQL? Have you used utPLSQL and/or anything else?

Update: Since this post was first published, I have been added as an administrator of the utPLSQL project (since August 2013). Please feel free to drop by!!

Update 2: I stepped down from the utPLSQL project in June 2016. My role at work had changed again, and I no longer used it. There were other people with more time and enthusiasm for moving the project on, so having migrated the project to its new home on GitHub, it was sensible for me to step aside and let them run with it. I wish them the best of luck 🙂

Advertisements