My company's application uses test containers for multiple images, plus flyway to setup schemas, etc. Our test suite is robust but long running. So I'm looking for ways to speed up the test suite execution. This is primarily for devs running the test suite on our local machines, vs something for the CI/CD where the overall execution time is less annoying.
To clarify, our suite takes ~5mins to run, so it's not like catastrophically bad. But I'm trying to cut that down.
One idea I have is related to the use of testcontainers. Starting the suite takes 45-60 secs, so eliminating this overhead will be very beneficial.
My thought is using local Docker containers for local development. Rather than creating the whole container from scratch when starting the suite, we could set everything up via Docker Compose or something like that, and use those containers for the test. This would be controlled by an environment variable, so this could be optionally turned on.
We're using the @Testcontainers framework integration, and I don't see any way to conditionally control the instantiation of testcontainers. I'm hoping there is some solution out there.