Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PL/SQL package automated testing

I would like to test private procedures/functions in given pl/sql package (oracle environment).

I need rather simple test (run procedure, check DB if row exist/or check return value) but in complex testing suite.

Which tool / approach would you recommend me ? (It's not possible to use paid solution).

I'm using SQL developer so option #1 is it's internal JUnit testing framework.

Other option is utPLSQL, to be more independent of SQL developer.

Third approach is complete different. I would use Apache JMeter to connect to DB a write tests in JMeter. I'm quite familiar with this tool. Downside is that it would be probably difficult/impossible for me to test private functions.

Your opinion ?

like image 895
jmt Avatar asked Dec 06 '25 16:12

jmt


1 Answers

I don't get your "simple test in complex test suite". However if your main testing scenario is:

  1. Set up test data in database table(s)
  2. Run a PL/SQL subprogram
  3. Verify the subprogram modified data in database table(s) correctly

I have a good news for you - http://dbfit.github.io/dbfit/ is a great tool for that kind of testing. I have used it in several occasions and I'm very happy with it.

Oh, and one can't access the package's private subprograms. You can only access package's public interface (the specification).

like image 187
user272735 Avatar answered Dec 08 '25 09:12

user272735



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!