Questions tagged [testcontainers]

TestContainers is a Java library that supports (JUnit) tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Testcontainers is an open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container.

Define your test dependencies as code, then simply run your tests and containers will be created and then deleted.

https://www.testcontainers.org/

881 questions
0
votes
2 answers

HBase + TestContainers - Port Remapping

I am trying to use Test Containers to run an integration test against HBase launched in a Docker container. The problem I am running into may be a bit unique to how a client interacts with HBase. When the HBase Master starts in the container, it…
Nick Allen
  • 1,443
  • 1
  • 11
  • 29
0
votes
1 answer

SpringBoot Integration testing Sybase and Testcontainers

Is it possible to use a sybase database with Testcontainers to do the integration testing with spring boot? I can not install docker on my local machine.
0
votes
1 answer

Using Docker and Testcontainers for database integration testing

After a bit of research I was led to think that Docker containers could be a good fit for database integration testing using test containers, as this would only require a Docker container running a database image reproducing the database schema…
Taoufik Mohdit
  • 1,910
  • 3
  • 26
  • 39
0
votes
1 answer

How to migrate JDBC URL based testcontainers to Junit 5

I have worked spring boot + testcontainers test based on JUnit 4. Example: @RunWith(SpringRunner.class) @SpringBootTest public Test { ... public void someTest() { ... } ... } test properties: spring: datasource: …
Eugene Stepanenkov
  • 896
  • 16
  • 34
0
votes
0 answers

Testcontainers : communicating between different networks

I am trying to build tests with containers on separated networks, but that can communicate with each other. The test is built with : A "server" network with two containers (postgres, api server) A "client" network with one container (other api…
Dede
  • 1,640
  • 2
  • 14
  • 24
0
votes
1 answer

Is it possible to use a local Docker image in a docker-compose file for DockerComposeContainer?

In my docker-compose.yaml file I use the image "my-service" (among other remote images that work fine) version: "2" services: myservice: image: my-service Normally I build the "my-service" image with maven using the io.fabric8…
0
votes
1 answer

How to execute kafka-configs command inside testcontainers kafka image

I'm using testcontainers kafka image which is confluent cp-kafka, I need to amend kafka config using command: ./kafka-configs.sh --alter --entity-name --entity-type topics --add-config message.timestamp.type=LogAppendTime --zookeeper…
marknorkin
  • 3,904
  • 10
  • 46
  • 82
0
votes
1 answer

Go get problem when using testcontainer-go

I was trying out the sample of the page https://github.com/testcontainers/testcontainer-go package main import ( "context" "fmt" "net/http" "testing" testcontainer "github.com/testcontainers/testcontainer-go" ) func…
guenhter
  • 11,255
  • 3
  • 35
  • 66
0
votes
1 answer

Kafka test container flaky tests

Integrated kafka into my spring project. Have written an integration using TestContainer approach but tests fails from time to time. Seems like some problem with the initialisation of kafka server. Here is my code below def setupSpec() { kafka…
pannu
  • 518
  • 7
  • 20
0
votes
2 answers

Detect Docker runtime on host using environment variables

I would like to run tests verifying the correct execution of Flyway migrations using TestContainers. Using JUnit5, I would like to enable these tests only on a host that have a Docker daemon running (@EnabledIfSystemProperty(named = "docker...",…
Florian Lopes
  • 1,093
  • 1
  • 13
  • 20
0
votes
1 answer

Cannot access org.openqa.selenium.WrapsDriver Selenide + TestContainers

I am trying to use Selenide 5.0.0 with TestContainers 1.9.1 dependencies { testCompile 'com.codeborne:selenide:5.0.0' testCompile 'org.testcontainers:selenium:1.9.1' } Apparently, these versions are incompatible, cause when I run my test I…
idmitriev
  • 4,619
  • 4
  • 28
  • 44
0
votes
1 answer

How to run test Containers with spring boot and spock

I want to use test container with spock on my spring boot application. these are my dependencies : dependencies { compile('org.springframework.boot:spring-boot-starter-data-redis') …
sam
  • 1,073
  • 4
  • 13
  • 27
0
votes
0 answers

Running same testcase with different runtime frameworks (arquillian & testcontainers) in Java

I have the following multi module project structure root | | ---- project A with arquillian testcases | | ---- project B builds war and runs same tests with different deployment config I want to run my testcases with two different…
finrod
  • 521
  • 8
  • 21
0
votes
1 answer

Running testcontainers inside a Docker container for Windows

As said in documentation, if I want to run testcontainers inside a docker I have to consider the following points: The docker socket must be available via a volume mount The 'local' source code directory must be volume mounted at the same path…
MarkHuntDev
  • 181
  • 3
  • 21
0
votes
1 answer

Can't start container through JDBC url with Spring boot (No XA DataSource class name specified)

I'm trying to run testContainer with specified url in app.yml: datasource: driver-сlass-name: org.testcontainers.jdbc.ContainerDatabaseDriver url: jdbc:tc:postgresql://hostname/databasename username: user password:…
dantalia
  • 3
  • 1
  • 5
1 2 3
58
59