Preamble

utPLSQL is a very versatile open source unit testing framework for Oracle PL/SQL.

It allow for automated testing of the below listed structures of PL/SQL:

  • Packages
  • Functions
  • Procedures
  • Anything that can be execute or observed in PL/SQL such as:
    • Table Default Values
    • Table Triggers
    • View Triggers
    • Objects

utPLSQL was originally developed by Steven Feuerstein and is now maintained by active team of developers.

Additional information can be found in the documentation

Purpose of this Post

The target of this post is, to Setup a evaluation-enviornment for utPLSQL by use Docker on Windows 7.

utPLSQL-presentation
utPLSQL-project

Prerequsisite

  • Oracle Download http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html → Oracle Database Express Edition 11g Release 2 for Windows x64
    (aus Upload entfernt, weil nur 10 MB möglich sind)
  • Docker bzw. Boot2Docker + VirtualBox vor Windows 10

Setup the database

  • copy Oracle zip to the path ./utplsql/resources/docker-images/OracleDatabase/dockerfiles/11.2.0.2
  • navigate to installation directory of the Docker Toolbox and execute the script start.sh
  • open a new tab and execute ./utplsql/setup/dockerTerminal.sh
  • navigate to the project such as ‚/c/Users/snauck/utplsql/setup‘
  • execute iOracleGenerate.sh, for generate the Docker-DB-Image
  • execute cOracleStart.sh, for start a Docker-DB-Container
  • open a new tab and execute´./utplsql/dockerTerminal.sh
  • navigate to the project such as ‚./utplsql/setup‘
  • execute initDb.sh, for initialize the DB

Generate test

  • open a new tab and execute the script ./utplsql/setup/dockerTerminal.sh
  • navigate to ‚./utplsql/setup‘
  • execute 1_logicStub.sh
  • execute 2_testGen.sh
  • execute 3_logicImp.sh
  • execute 4_logicFixImp.sh

Execute test

  • open a new tab and execute ./utplsql/setup/dockerTerminal.sh
  • navigate to ‚./utplsql/setup‘
  • execute connectOracle.sh, for open the shell of the DB-Server
  • execute sqlplus UTPLSQL_V3/UTPLSQL@xe
  • execute SET SERVEROUTPUT ON
  • execute exec ut.run();

Discard database

  • open a new tab and execute ./utplsql/setup/dockerTerminal.sh
  • navigate to ‚./utplsql/setup‘
  • stop the Docker-DB-Container by execute cOracleStop.sh
  • remove the Docker-DB-Container by execute cOracleRemove.sh
  • remove the Docker-DB-Image iOracleRemove.sh

Leave a comment

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert