Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Location
    Centurion, South Africa
    Posts
    20

    Unanswered: Shell Script For DB2 Deployment Unit Testing

    Hello

    We are trying to automate the Unit testing of DB2 objects deployed on Linux server using Shell script. After deployment of code the script will check the objects created on the day of deployment and send a list of objects with their status.
    Currently we are targetting the below objects:
    1. Tables (includes both creation and take record counts if tables are populated by batch jobs)
    2. Indexes
    3. Views

    Is there any recommended framework or tool so that we can directly make use of it.

    Thanks & Regards
    Satyajit

  2. #2
    Join Date
    Mar 2006
    Location
    Bogota, Colombia
    Posts
    21
    Hi

    What kind of unit test are you trying to do?
    What do you mean by "list of objects and their status"?
    What can you test with a view? if it does exist?

    There is a db2 unit testing framework, published in GitHub. With this framework you can test values in the DB2's routines: https://github.com/angoca/db2unit This is a xUnit framework, that allows to assert values.

    For example, you can set a variable with the value if a table was created.

    set actual = (select true from syscat.table where tabschema = '...' and tabname = '...');
    AngocA

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •