Skip to content

example project how to use micronaut-test-resources in combination with kotlin

Notifications You must be signed in to change notification settings

mf-guse/micronaut-test-resources-test

Repository files navigation

Introduction

This project is a demo project how to use Micronaut Test Resources in a micronaut kotlin project using PostgreSQL.

The sourcecode is heavily inspired by the blogpost Introducing Micronaut Test Resources written by Cédric Champeau.

Findings

My development environment is

  • Windows 10
  • Java 17
  • latest gradle
  • Docker / Kubernetes provided by Rancher Desktop
  • IntelliJ with kotest Plugin
  • Ubuntu WSL2 with Java 17 and latest gradle

IntelliJ and kotest Plugin

Starting the tests using the kotest plugin does not work. The PostgreSQL testcontainer is not started.

Using gradle to run tests

Running the tests using gradle, either started in IntelliJ or in the CLI, the testcontainer is started and the tests are executed as expected.

WSL2

Running gradle build works. The PostgreSQL testcontainer is started, the test is executed as expected.

Micronaut 3.7.3 Documentation


Feature test-resources documentation

About

example project how to use micronaut-test-resources in combination with kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages