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)
Is there any recommended framework or tool so that we can directly make use of it.
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 = '...');