Skip to main content

Posts

Showing posts with the label Unit test

Run Unit tests using DBTest library

Sybase IQ columnar analytics database uses DBTest as Unit test library. Following are the steps to use it: $ cds $ cd testlib $ vi xyz.tst #Write the dbtest. $ dbtest -y xyz.tst #Checks for syntax errors in the tst file. $ vi my.bch #Enter in the first line "xyz.tst" $ vi xyz.op #This is the output file whose contents are compared with the actual run-time output of the test. $ cd .. $ cmake debug64 $ cdp (test directory) $ setup current debug64 $ run_saint_testlib.sh -port xxxx -newdbonerror my.bch #This run the tests If test fails then $ vi xyz.ot #Check out the errors. $ vi xyz.tst #Correct the errors and rerun the test. Use dbtest command to run your tests: On terminal 1, run commands: $ setenv IQTMP `pwd` $ setenv IQTMP15 `pwd` $ setenv ASTMP `pwd` $ runsrv abc abcd.db, OR $iqsrv15 -n abc abcd.db -zr all -gd all -gl all -c 32m -ch 200m -x "tcpip(port=xxxx)" On terminal 2, run commands: $ setenv IQTMP `pwd` $ setenv IQTMP15 `pwd` $ setenv ASTMP `pwd` dbt...