com.dimafeng.testcontainers.munit.fixtures.TestContainersFixtures
Creates a fun-fixture that starts a single container before each test and stops it after each test.
Creates a fun-fixture that starts a single container before each test and stops it after each test.
class MysqlSpec extends FunSuite with TestContainersFixtures { val mysql = ContainerFunFixture(MySQLContainer()) mysql.test("test case name") { container => // Inside your test body you can do with your container whatever you want to assert(container.jdbcUrl.nonEmpty) } }
(Since version ) see corresponding Javadoc for more information.