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
1 answer

TestContainers Oracle TimeoutException

I tried to use testcontainers library for integration tests with Oracle. Here is is the simple test: public class SimpleTest { @Rule public OracleContainer oracle = new OracleContainer(); @Test public void simpleTest() throws…
yanefedor
  • 2,132
  • 1
  • 21
  • 37
0
votes
1 answer

"No such network" error when trying to re-use Testcontainers rules with network from abstract class

Suppose I have an abstract class called AbstractTestWithNetwork: @RunWith(JUnit4.class) public abstract class AbstractTestWithNetwork { @ClassRule public static Network network = Network.newNetwork(); @ClassRule public static…
Kirill
  • 6,762
  • 4
  • 51
  • 81
-1
votes
0 answers

Connection to node -1 (localhost/127.0.0.1:32929) terminated during authentication

I am using Kafka TestContainer to write the Integration test @ClassRule public static KafkaContainer kafkaContainer = new KafkaContainer(DockerImageName.parse(KAFKA_CONTAINER_IMAGE_NAME)) .withExposedPorts(9092,…
-1
votes
1 answer

Cannot find symbo postgresqlContainer. withLogConsumer(new Slf4jLogConsumer(log))

I have a configuration file for initializing testcontatainers. @Slf4j public class PostgresqlContainerInitializer implements ApplicationContextInitializer { private static final String POSTGRESQL_IMAGE =…
skyho
  • 1,438
  • 2
  • 20
  • 47
-1
votes
1 answer

TestContainers - create GenericContainer and get the uri/path

I'am trying to create isolated test env using TestContainers (for database - postgresql and external services - for example authorising service). My question is, how can i set path in application.yml/application.properties to these external…
user17885178
-1
votes
2 answers

creating a devtools session with selenium 4 using remotewebdriver

trying to run with webdriver contianer and selenium 4 after creating a devtools session I am getting: class org.openqa.selenium.remote.RemoteWebDriver cannot be cast to class org.openqa.selenium.chrome.ChromeDriver when…
Nir Tal
  • 309
  • 1
  • 4
  • 15
-1
votes
1 answer

Can't connect to docker via ssh using testcontainer

My task is connected to the container via ssh from tests. I have dockefile: (almost from https://docs.docker.com/engine/examples/running_ssh_service/) FROM ubuntu:18.04 RUN apt-get update RUN apt-get install -y openssh-server RUN mkdir…
Ann
  • 1
  • 1
-1
votes
1 answer

how do I run run junit on remote postgresql docker

I'm trying to run juinit on a remote postgresql docker. I tried to use testcontainers.org but I can't get the configuration to work I keep getting timeout exception Does testcontainers support such setup? if so is there an example for that? Thanks
user1109846
  • 37
  • 10
-3
votes
1 answer

Why it has the type Nothing?

I am trying to use https://www.testcontainers.org/ in my bdd test as follows: final class DetectorSpec extends BddSpec { private val listener1 = TestProbe() private val listener2 = TestProbe() private val detector =…
softshipper
  • 32,463
  • 51
  • 192
  • 400
1 2 3
58
59