Skip to main content
Filter by
Sorted by
Tagged with
58 votes
8 answers
68k views

I'm using TestContainers with Spring Boot to run unit tests for repositories like this: @Testcontainers @ExtendWith(SpringExtension.class) @ActiveProfiles("itest") @SpringBootTest(classes = ...
Martin Schröder's user avatar
1 vote
1 answer
8k views

I want to run integration tests that test my kafka listener and avro serialization. this requires a Kafka and a Schema regsitry (transitively also a Zookeeper). When testing I currently have to a ...
azurius's user avatar
  • 13
14 votes
3 answers
30k views

I use Localstack with Testcontainers((testcontainers:localstack:1.15.2 )) for integration tests and set up the secret in the test setup like this: Code sample import com.amazonaws.services....
unknown's user avatar
  • 699
25 votes
6 answers
8k views

I have a spring boot app. I'm testing it with testcontainers to ensure that the DB (postgres) and the Repository implementation do what they are supposed to do. I initialise the container with the ...
davide's user avatar
  • 342
10 votes
5 answers
8k views

Trying out testcontainers for integration testing. I am testing rest api endpoint. Here is the technology stack - quarkus, RESTEasy and mongodb-client I am able to see MongoDB container is started ...
Tushar's user avatar
  • 273
5 votes
3 answers
4k views

I have a problem similar to Run (Docker) Test Container in gitlab with Maven. The difference is that rather than my script running mvn directly it runs a docker multistage build that runs the test ...
Raymond's user avatar
  • 426
1 vote
1 answer
2k views

I am getting an error while running tests on gitlab CI using the command: ./gradlew clean test I am using test containers to run my tests: https://www.testcontainers.org/modules/docker_compose/ ...
chom's user avatar
  • 701
18 votes
1 answer
10k views

I execute some tests in GitHub Actions using Testcontainers. Testcontainers pulls the images which are used in my tests. Unfortunately the images are pulled again at every build. How can I cache the ...
Oliver's user avatar
  • 473
12 votes
4 answers
11k views

I'm trying to define a @TestConfiguration class that is executed once before all integration tests to run a MongoDB TestContainer in Kotlin in a Spring Boot project. Here is the code: import org....
Marco's user avatar
  • 501
11 votes
1 answer
16k views

Sometimes I need to install a port for Postgresql, which I run for tests in a container. But the Test container the developer command ofTestcontainers removed this feature. But somewhere there is a ...
skyho's user avatar
  • 1,963
9 votes
2 answers
18k views

I'm doing integration tests in my Spring Boot app. The app needs a Redis to work with. During development phase, I have a local container of Redis that the app connects to. For the integration tests,...
riorio's user avatar
  • 6,896
7 votes
1 answer
4k views

I am trying to programmatically create and spin up a Testcontainers GenericContainer from a docker image hosted in a private AWS ECR repository. This will be used for automated integration tests, will ...
Jeff Trimmer's user avatar
6 votes
2 answers
20k views

I started playing with testcontainers and at the beginning of my journey I faced some issue (below). I did similar thing for mysql db and it worked fine. Do I miss some mongo specific config? ...
wacik93's user avatar
  • 303
6 votes
2 answers
5k views

I use Testcontainers.MsSql 3.0.0 for integration tests in asp.net project. Integration tests run successfully in visual studio test runner. But when I run tests in docker desktop version 20.10.7 by ...
vahid tajari's user avatar
  • 1,313
5 votes
4 answers
4k views

I'm working with FTPClient against an FTP server using Testcontainers. A reproducible code sample is here: import org.apache.commons.net.PrintCommandListener; import org.apache.commons.net.ftp.FTP; ...
orirab's user avatar
  • 3,428
5 votes
3 answers
17k views

I'm trying to run Integration Tests on my local. I'm trying to pull mongo 3.6.0 image, I'm getting following errrors. The same thing is working on non-m1 mac. ERROR org.testcontainers.dockerclient....
harshini reddy's user avatar
4 votes
3 answers
5k views

I have several test nodes, but I run the container as a singleton. @ActiveProfiles("test") @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @...
skyho's user avatar
  • 1,963
4 votes
1 answer
2k views

I face this error when try to run bitbucket pipelines with test container Could not start container java.lang.IllegalStateException: Container did not start correctly. There is no another issues but ...
puka's user avatar
  • 153
4 votes
1 answer
13k views

Creating my container as: public static PostgreSQLContainer<?> container = new PostgreSQLContainer<>("postgres:latest"); static { container.start(); System.setProperty("driver-...
Tyulpan Tyulpan's user avatar
4 votes
2 answers
5k views

In order to setup the Testcontainer's MsSqlTestcontainer for testing, I copied the script emitted by dotnet ef migrations script and planted it in the unit-test's setup (actual code doesn't : void ...
Tar's user avatar
  • 9,125
3 votes
1 answer
3k views

I'm trying to create an integration test with PubSub emulator based on the example from this GitHub repo which looks like @SpringBootTest @Testcontainers @ActiveProfiles("test") public class ...
JackTheKnife's user avatar
  • 4,234
2 votes
1 answer
3k views

I am using Testcontainers (https://www.testcontainers.org/) with the Postgres module in a Spring Boot application with Kotlin and have configured everything as in this tutorial (https://www.wwt.com/...
tomson's user avatar
  • 181
2 votes
1 answer
2k views

Test container configuration @TestInstance(TestInstance.Lifecycle.PER_CLASS) @Testcontainers public abstract class TestContainerFixture { @Container protected static final GenericContainer ...
San Jaisy's user avatar
  • 17.4k
2 votes
3 answers
8k views

I create an integration test for retrieving data from elasticsearch. I am using default values for the testContainer so my RestHighLevelClient should have access to the test container but all the ...
Ice's user avatar
  • 2,019
2 votes
1 answer
2k views

I configured bitbucket-pipelines.yml and used image: gradle:6.3.0-jdk11. My project built on Java11 and Gradle 6.3. Everything was Ok till starting test cases. Because I used Testontainers to test the ...
Nasibulloh Yandashev's user avatar