Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit testing for PL/SQL [closed]

Tags:

Anyone have any experience or tools for unit testing PL/SQL. The best looking tool I've seen for this seems to be Quests Code Tester, but i'm not sure how well that would integration with continuous integration tools or command line testing?

like image 347
Matthew Watson Avatar asked Sep 30 '08 09:09

Matthew Watson


People also ask

How do I debug a PL SQL package?

Right-click the PL/SQL object that you want to debug and select Database Tools | Recompile. In the Recompile dialog, select With "debug" option. Click OK.


2 Answers

I use utPLSQL as the framework and OUnit as the client. utPLSQL isn't really meant to be used by itself, a good graphical client is required. OUnit is the predecessor to Qute. Qute is also a good tool but more complex than my requirements - it allows you to construct tests using a GUI and does good stuff like test code generation.

Edit: My understanding is that utPLSQL stores all results in database tables, including all historical results which would make a good data source for gathering statistics for continuous integration. You can also define test groups so a single call to utPLSQL can call multiple test packages.

like image 158
darreljnz Avatar answered Oct 14 '22 05:10

darreljnz


Check utPLSQL out. I found it somewhat difficult to start with, but i think it does the job reasonably well.

As for continuous integration tools, I used to create usual tests (NUnit, C#) that just called the stored procedures created with utPLSQL and checked their result out.

like image 28
Mac Avatar answered Oct 14 '22 05:10

Mac