12

Does anyone have any frameworks/apps/methodologies for creating Unit tests with Oracle?. I'm using Oracle 11g.

I also have Team Foundation Server installed, where we do all our other development work with Visual Studio on a web app.

Edit: I'm looking to run unit tests on Packages, Procedures and Functions within Oracle (PL/SQL)

APC
  • 144,005
  • 19
  • 170
  • 281
Hector Minaya
  • 1,695
  • 3
  • 25
  • 45
  • 2
    What language/framework are you developing your app in? Usually unit tests are done in the language/framework your app is written with. Are you specifically looking to unit test stored procedures and such? – Peter Recore Dec 16 '09 at 21:34
  • http://stackoverflow.com/questions/152441/unit-testing-for-pl-sql http://stackoverflow.com/questions/203376/unit-testing-framework-for-oracle-pl-sql – jva Dec 16 '09 at 22:57

1 Answers1

8

There are a couple of options. Oracle SQL Developer has a built-in test suite but that's no use for people using other IDEs such as PL/SQL Developer, and also not helpful for CI purposes.

The best choice is UTPLSQL, which was originally written by the renowned Steven Feuerstein. This is pure PL/SQL. It is pretty good and free open source software.

The really good news is that - after a long period of hibernation - UTPLSQL is back in active support. Version three is a complete re-write, with clever support for readable tests: it's a lot more like the JUnit and NUnit style of unit testing. Excitingly there are hooks for running UTPLSQL tests - including rendered output - in CI tools like TeamCity, Jenkins, etc. There is also a community of developers writing helpful extensions, such as a SQL Developer plugin.

There's a migration tool for v2 tests.


Author's note: I have completely re-written this answer to reflect the fact that UTPLSQL is now an active product again.

APC
  • 144,005
  • 19
  • 170
  • 281