Part 5: How to run a Unit Test

In terms of Oracle Unit Tests and the use of UTPLSQL you could, if you wish, run the unit test from the command line on SQL*PLUS.

eg exec utplsql.test(‘P_TE_CUSTOMER’); (Note the absense of the preceeding ‘UT_’ when running the test, UTPLSQL is expecting you to just type the package name)

This will give you the result of your unit test in a text based output. (Remember to SET SERVEROUTPUT ON;)

At this present time there is now user-friendly interface for UTPSQL. However, this little query will show most of what you need to see in relation to this particular example…

select owner,name,executions,failures,last_status,last_end,last_run_id,last_status,name
from ut_package
where owner in ('MYSCHEMA');

 

On to Part 6

Leave a Reply

Your email address will not be published. Required fields are marked *