Thread: Unit testing plpgsql code

Unit testing plpgsql code

From
Casey Duncan
Date:
Anyone know of a unit testing framework for plpgsql stored procedures?
We are about to convert a bunch of stored procedures from Oracle over
to Postgresql. We currently use the utPLSQL package to unit test
those, so something comparable to it would be optimal.

We'll probably roll our own if nothing currently exists, but I figured
it was worth it to ask first before reinventing the wheel.

TIA,

-Casey

Re: Unit testing plpgsql code

From
Ben
Date:
I made something for one of my projects. I'm really not happy with it
(it borders on unmaintainable) but it does work and if you're desperate
I could share. But I wouldn't be unhappy if you rolled your own, so I
could use that. :)

On Nov 20, 2004, at 7:33 PM, Casey Duncan wrote:

> Anyone know of a unit testing framework for plpgsql stored procedures?
> We are about to convert a bunch of stored procedures from Oracle over
> to Postgresql. We currently use the utPLSQL package to unit test
> those, so something comparable to it would be optimal.
>
> We'll probably roll our own if nothing currently exists, but I figured
> it was worth it to ask first before reinventing the wheel.
>
> TIA,
>
> -Casey
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend