/
Using multiple databases for taskana-core unit tests

Using multiple databases for taskana-core unit tests

By default the unit tests will run with the H2 in memory database. If you want to run the tests with a different database you have to create the taskanaUnitTest.properties file in your home directory.

That file must contain the following information:

  • jdbcDriver

  • jdbcUrl

  • dbUserName

  • dbPassword

  • schemaName

Use preconfigured database docker images

Requirements: Docker on you machine

In the folder docker-databases you find a prepare_db script which starts the requested database and create the appropriate taskanaUnitTest.properties file for you. 

*nix (prepare_db.sh)

Execute ./docker-databases/prepare_db.sh -h and follow the help output for that script. It tells you how it works and which databases can be used

Windows (prepare_db.bat)

Just execute the file. This is an interactive bat file which provides all the options for you.

Examples for taskanaUnitTest.properties

DB2 11.5

taskanaUnitTest.properties
jdbcDriver=com.ibm.db2.jcc.DB2Driver jdbcUrl=jdbc:db2://<host>:<port>/<database> dbUserName=<username> dbPassword=<password> schemaName=TASKANA

POSTGRES 14.7

taskanaUnitTest.properties
jdbcDriver=org.postgresql.Driver jdbcUrl=jdbc:postgresql://<host>:<port>/<database> dbUserName=<username> dbPassword=<password> schemaName=taskana

Related content

Testing Guidelines
Testing Guidelines
More like this
Recommended Plugins
Recommended Plugins
Read with this
Testing of the JBoss/Wildfly deployment
Testing of the JBoss/Wildfly deployment
More like this
Outcomes (2020)
Outcomes (2020)
Read with this
Database Configuration
Database Configuration
More like this
Test User Structure
Test User Structure
Read with this