Wednesday, November 28, 2007

Utplsql ,Jutex(with resolved bug) and Ounit with CruiseControl

Utplsql,Ounit and Jutex are open source projects which can be configured easily for execution of utplsql test cases , and coverage of those tests in the junit report format along with cruisecontrol for continuous integration.


Utplsql is the frame work for execution of Plsql unit test cases.

Ounit is the user interface , enabling better representation of the unit tests cases run .(It uses utplsql for execution of test cases).

Note : Give sufficient privileges for creation of ut modules during installations . Also give execute privilege on dbms_pipe to the schema in which the tests execute.

Jutex is another source forge project which , uses


Jutex to install unit test cases

Utplsql to run the test cases

Dbms Profiler to get the coverage data

Sqlplus to connect to the database

JunitReport package for presentation of these results in the junit report format

Jutex provides a xml , with targets for each of these to be done

(it has a bug – coverage results are not shown for ut modules which are procedures or functions , but works fine with packages )

Solution : change the script install_jutex.sql in the jutex/Code/ folder .


UT_PACKAGE_SRC_PROFILING_V à add in the where clause
unit_type = 'PACKAGE BODY' or unit_type = 'PROCEDURE' or unit_type = 'FUNCTION')

make similar changes in

UT_PACKAGE_SRC_COVERAGE_V

UT_PACKAGE_SRC_PROFILING_V to include procedure and function.
This is because the coverage results are filled in the dbms_profiler table , but not picked up during the xml creation for report generation .

The above change should give the detailed coverage for the executed test results.



 
Free Domain Names @ .co.nr!