Sponsors
  • Intel
  • Microsoft
  • Google
  • Sun Microsystems
  • BT
  • IBM
  • Yahoo! Inc.
  • Zimbra
  • Atlassian Software Systems
  • Disney
  • EnterpriseDB
  • Etelos
  • Ingres
  • JasperSoft
  • Kablink
  • Linagora
  • MindTouch
  • Mozilla Corporation
  • Novell, Inc.
  • Open Invention Network
  • OpSource
  • RightScale
  • Silicon Mechanics
  • Tenth Planet
  • Ticketmaster
  • Voiceroute
  • White Oak Technologies, Inc.
  • XAware
  • ZDNet

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com.

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for more information on trade opportunities with O'Reilly conferences, or contact mediapartners@oreilly.com.

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com.

OSCON Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the OSCON newsletter (login required).

Contact Us

View a complete list of OSCON 2008 Contacts

PLUTO: PL/SQL Unit Testing for Oracle

Josh McAdams (Google)
Databases
Location: D133
Average rating: ****.
(4.20, 5 ratings)

Even closed-source systems can benefit from open source projects. Oracle is one of the most widely used database management systems among businesses today. It supports a rich programming language called PL/SQL, that allows for database programmers to write some very complex applications. As these applications grow, the need to develop automated test suites around them increases; however, the PL/SQL culture isn’t the most committed to testing.

That being said, 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.

This was the sad state of PL/SQL testing that I discovered when I set out looking for a testing system for the project that I work on at my day job. You see, the company that I work for is determined to create quality automated tests suites for all of the code that they can. I am on a data warehouse project, so most of my code is inside the database. I asked around, surfed the Internet, talked to experts, but I could not find a good open solution. You know what that means don’t you?

You got it, write my own. What I came up with is called
PLUTO, which stands for PL/SQL Unit Testing for Oracle. PLUTO steals many of the good ideas from popular unit testing systems like JUnit and applies them to PL/SQL code. With Oracle’s rich data dictionary and its relatively new object types, PL/SQL was actually a surprisingly easy language to implement an introspecting unit testing framework in. Of course, there are some limitations and oddities to the language itself, but overall, PLUTO has proved to be quite a useful testing system.

In this talk, I’ll walk the audience through the short history of PLUTO and point out some of the reasons for the design. This will be followed by some practical examples that can be used in everyday code. PL/SQL isn’t the easiest code to test, so the examples will go over some challenging cases and tradeoffs. There will also be an example of integrating PUTO with an existing testing suite driven by a continual integration and testing product like Cruise Control. After that, the talk with focus on the internals of the system and will then wrap up with a short discussion on what features will be added to PLUTO in the near future.

People planning to attend this session also want to see:

Photo of Josh McAdams

Josh McAdams

Google

Josh McAdams is a programmer and engineering manager at DoubleClick/Performics. He leads the data warehousing team where he finds himself working in PL/SQL almost as much as favorite language, Perl. In his free time he contributes a little code to the Open Source community and hosts the Perlcast podcast.

OSCON 2008