Yet another reason to unit test your (PL/SQL) code

The last few months, I’ve had the pleasure of using utPLSQL v3, a unit testing framework for PL/SQL, on a new project that I’m working on. Sure – writing tests takes a bit extra time, but it’s such a huge help when you’re constantly refactoring a system that grows from zero.

This week, I had a new use case: We had to move our test-system to a new cloud account. (Yes we’re running everyting on Oracle Cloud). After we had done the transition, I ran my unit tests as a smoke test to see if everything in the database was in place. I spotted a couple of missed job-definitions, got them installed and reran the tests to verify that everything was ok. Thanks to the tests, the transition went very smooth.

Jacek Gebal, whom I had the pleasure of getting a utPLSQL shirt from at the OUG Ireland conference, and his fellow contributors have really done a great job on this and has really lowered the threshold for doing unit-testing for database code!

Whether you want to check it out or not, you should go to utPLSQL.org, where you’ll find documentation, source and more. The github repo is at github.com/utPLSQL.

Test your code – not you patience!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s