How to run unit tests

All unit test are under the test.massimo.* package, built using the Ant target testbuild.

They can be run individually, e.g. using the shell script srUnit:

bin/srUnit tools.scriptrunner.utils.DBHelperTest
or all together using the Ant target test. The unit test classes and required files are created in or copied to the build directory. The test target re-creates the build directory and runs all tests. The test output goes into build too.

Many unit tests require database connections, either Oracle or Postgres. The connection details used are in src/test/oracleCxns.xml and src/test/postgresCxns.xml. There is no clean way to exclude unit tests for one database or the other: unless you are have both configured, some of the tests will always fail.

To ensure the cross-platform capabilities are maintained, unit tests should be run on both Unix or Windows.