Oracle Unit Testing

This site details Best Practices for unit testing on a simple multi-tiered Oracle Database. Unit testing is now a standard with the majority of software companies and the example below follows a well tested structure which lends itself easily to the development of n-tier applications.

We will also be giving worked examples of a Daily Build Architecture for Oracle Databases using ANT.

Check our resources page for further software tools and books to help you in your Oracle projects.

Go to part 1 of Oracle Unit Testing

Read more »

Daily Software Builds using ANT

Daily Builds are fast becoming a recognised component of software development.

In the context of an Oracle database, a regular daily build can show inconsistencies (invalid packages, structural changes) immediately and highlight exactly where something has gone wrong.

Traditional development methods saw the programmers developing and testing only once, maybe twice and usually at the end of the project. With this Agile technique the Build will tell you as soon as anything goes wrong, thus allowing you to fix it before it’s too late.

Also of great value is the fact that you can take a “branch” at any time from the current stable build and promote this to the Live application with confidence that, at least, the system is stable. (Obviously functional testing is still required)

In this example we will demonstrate using ANT for create our daily build.

Click here to get started Read more »

API Builder

This simple PLSQL program will…

  1. Save you hours (possibly days or even weeks) of development time.
  2. Contribute to your regular Daily Build architecture.
  3. Provide you with a complete Package per table with all DML (SELECT, INSERT, UPDATE, DELETE) functionality included.

How does it work?

The API Generator creates code from a master PLSQL package and spools the result out to a text file (script.sql)

It then runs this file and creates an entire PLSQL layer to handle all DML functions for all tables in your schema.

Here’s the simplified running order…

  1. run api_builder.sql in SQLPlus (or TOAD).
  2. three tables are created to handle all generated code
  3. Base package is created to handle code generation.
  4. Package is run to generate code.
  5. Code is then spooled out to physical file.
  6. File is then run from SQLPlus and packages are created.
  7. Commit!
For a more detailed working example click here. For a video demonstration of API Builder click here! Read more »