How to define single context for all test subclasses with testcontainer?

46 views Asked by At

I have an abstract class for integration tests and 2 subclasses. Base class contains configuration for MongoDB test container. How to define reuse container and spring application context for all test subclasses?

I've tried to start container with reuse option and define reuse.enabled=true in .testcontainers.properties but it still creating a new container per class. Also I have no clue how to define single application context for all subclasses

0

There are 0 answers