Test setup

ebean-test is used to setup and configure Ebean for running tests.

1. Add ebean-test as a test dependency

dependencies {
    testCompile 'io.ebean:ebean-test:13.6.0'

2. Add application-test.yaml

In src/test/resources add application-test.yaml configuration file like the one below.

    platform: h2 # h2, postgres, mysql, mariadb, oracle, sqlserver, hana, clickhouse, sqlite
    ddlMode: dropCreate # none | dropCreate | migration
    dbName: my_app

We can change the platform to any of the supported platforms. Ebean test will automatically manage a docker test container setting it up to run tests. Refer to testing for more information.