Toad World® Forums

Q & A with person evaluating Code Tester and open source frameworks


#1

A developer recently contacted me with these questions:

I’ve been asked to find out/evaluate about PLSQL Testing frameworks for the project I currently work on for the last few days for Monday morning, with a view to possibly using an automated tool.
I’m looking to find the best way to automate testing of PL/SQL code. The technical aspects of an approach, associated costs involved, etc.

The tools I’m aware of are utPLSQL and Ounit, QUTE, Quest Code Tester for Oracle, PLUTO and DBUnit. I have been googling, not much good info on PLUTO and we have used DBUnit, but it requires alot of script writing.
Information I’m looking for each one:

  • Alliance with xUNIT, anything that may be interesting as a selection criteria.
  • Whether they are based on utPLSQL, or what approach they use if this is useful
  • How they might integrate with Junit, as a calling framework.
  • Support they provide within tests eg: exception comparisons, resultset comparison, data comparisons, ref cursor support and comparison, dynamic SQL support.
  • anecdotal support for usability ie: usage and whether they are problematic
  • If open source is there a large community associated, forums etc…

I’ve come across alot of info on utPLSQL and Quest Code, but’s it’s important that an automated solution can integrated into Junit as a calling framework (My Technical manager’s words).
We are also using CI Cruise Control to run our Java tests to produce build test reports.
We currently have crudely integrated our PLSQL tests into Junit by simply calling the procedures and then compare current .out files with a previous .out.good file and if they match then tests have passed, but this assumes one as validated the previous good file.

Thanks.


#2

Here is the answer I sent to Vijay:

Here is an overall summary from my perspective (I wrote utPLSQL originally in 1999 and have been working on the issue of automated testing since then. My latest effort, as I am sure you realize, is Code Tester, a commercial product):

** You can run tests via a PL/SQL API, so you can simply construct blocks of code and call those from your ANT scripts. See the Help doc under “How do I…Run Tests from a Script?”

** I don’t see why you couldn’t run a test as described in the first bullet item, and then verify the results and display them within Junit, sure.

** utPLSQL is the most widely used xUnit framework that I know of, and it is helpful but shares the same problem as Junit: you have to write the test code yourself. Most organizations will not do this.

** Ounit is an unsupported UI on top of utPLSQL.

** QUTE is an early version of Code Tester; do not include it in your evaluation. It is not incomplete and unsupported.

** PL/Unit is a lite version of utPLSQL.

** PLUTO is an object type implementation of utPLSQL (xUnit).

**dbFit is another framework you might look into; it takes a “table script” approach to specifying tests. I can’t imagine using it for a very large complex set of tests.

** Code Tester offers by far the most automation and the best coverage of tests (datasets, cursor variables, collections, exceptions, etc.). Its breakthrough is that you describe tests, the product generates your test code! It does not utilize utPLSQL; I found that this open source framework was simply too restrictive to allow me to offer the kind of testing I wanted to do in Code Tester.

I hope that this helps in your evaluation.

Regards, Steven