Related: Trouble Shooting

Ebean test

Add ebean-test as a test dependency

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

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 platforms for more information.

We most often use dropCreate DDL mode during development. Refer to testing DDL mode for more information.

Next: Write an entity bean using Java Kotlin