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

    Unanswered: Shell Script For DB2 Deployment Unit Testing


    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

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

    Thanks & Regards

  2. #2
    Join Date
    Mar 2006
    Bogota, Colombia

    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: 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 = '...');

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