{"id":3528,"date":"2022-08-16T11:43:43","date_gmt":"2022-08-16T11:43:43","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/quick-guide-on-how-to-run-containers-from-tests\/"},"modified":"2026-03-11T05:56:42","modified_gmt":"2026-03-11T05:56:42","slug":"%ce%b3%cf%81%ce%ae%ce%b3%ce%bf%cf%81%ce%bf%cf%82-%ce%bf%ce%b4%ce%b7%ce%b3%cf%8c%cf%82-%ce%b3%ce%b9%ce%b1-%cf%84%ce%bf-%cf%80%cf%8e%cf%82-%ce%bd%ce%b1-%ce%b5%ce%ba%cf%84%ce%b5%ce%bb%ce%b5%ce%af%cf%84","status":"publish","type":"post","link":"https:\/\/thecodest.co\/el\/blog\/quick-guide-on-how-to-run-containers-from-tests\/","title":{"rendered":"\u0393\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2 \u03bf\u03b4\u03b7\u03b3\u03cc\u03c2 \u03b3\u03b9\u03b1 \u03c4\u03bf \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 Containers \u03b1\u03c0\u03cc \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2"},"content":{"rendered":"<p>\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ce <strong>Spring Boot <\/strong> \u03c3\u03c4\u03bf <a href=\"https:\/\/thecodest.co\/el\/dictionary\/why-do-projects-fail\/\">\u03ad\u03c1\u03b3\u03bf<\/a> \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bc\u03b5\u03b9\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c4\u03c5\u03c0\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7. \u03a4\u03b1 \u03b4\u03bf\u03c7\u03b5\u03af\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ce\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b1\u03bd\u03b5\u03be\u03ac\u03c1\u03c4\u03b7\u03c4\u03b1 \u03b1\u03c0\u03cc <strong>\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf Spring<\/strong> \u03ba\u03b1\u03b9 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c7\u03c9\u03c1\u03af\u03c2 \u03b1\u03c5\u03c4\u03cc.<\/p>\n\n\n\n<p>\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ce \u03c4\u03b7\u03bd \u03ad\u03ba\u03b4\u03bf\u03c3\u03b7 1.17.3 \u03c4\u03bf\u03c5 Testcontainers, \u03b1\u03bb\u03bb\u03ac \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03b9\u03bf \u03c0\u03c1\u03cc\u03c3\u03c6\u03b1\u03c4\u03b7. \u0394\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 \u03bc\u03b5 \u03b4\u03bf\u03c7\u03b5\u03af\u03bf Postgres.<\/p>\n\n\n\n<p>\u03a0\u03c1\u03ce\u03c4\u03b1 \u03bf\u03c1\u03af\u03c3\u03c4\u03b5 \u03c4\u03bf \u03b4\u03bf\u03c7\u03b5\u03af\u03bf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">public class Postgres13TC extends PostgreSQLContainer {\n  private static final Postgres13TC TC = new Postgres13TC(),\n\n  private Postgres13TC() {\n    super(\"postgres:13.2\"),\n  }\n\n  public static Postgres13TC getInstance() {\n    return TC,\n  }\n\n  @Override\n  public void start() {\n    super.start(),\n    System.setProperty(\"DB_URL\", TC.getJdbcUrl()),\n    System.setProperty(\"DB_USERNAME\", TC.getUsername()),\n    System.setProperty(\"DB_PASSWORD\", TC.getPassword()),\n  }\n\n  @Override\n  public void stop() {\n    \/\/ \u03b4\u03b5\u03bd \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03c4\u03af\u03c0\u03bf\u03c4\u03b1. \u0391\u03c5\u03c4\u03cc \u03b5\u03af\u03bd\u03b1\u03b9 \u03ba\u03bf\u03b9\u03bd\u03cc\u03c7\u03c1\u03b7\u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b4\u03b5\u03b9\u03b3\u03bc\u03b1. \u0391\u03c6\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b7\u03bd JVM \u03bd\u03b1 \u03c7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u03b5\u03af \u03b1\u03c5\u03c4\u03ae \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1.\n  }\n}<\/code><\/pre>\n\n\n\n<p><code>\u03a3\u03c4\u03b7 \u03c3\u03c5\u03bd\u03ad\u03c7\u03b5\u03b9\u03b1, \u03b1\u03c1\u03c7\u03b9\u03ba\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf \u03c0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf \u03c4\u03b7\u03c2 \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2 Spring. \u03a0\u03b1\u03af\u03c1\u03bd\u03bf\u03c5\u03bc\u03b5 \u03cc\u03bb\u03b1 \u03c4\u03b1 <a href=\"https:\/\/thecodest.co\/el\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">\u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1<\/a> source configuration \u03b1\u03c0\u03cc \u03c4\u03bf container instance \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03c4\u03b9\u03c2 \u03bf\u03c1\u03af\u03c3\u03b5\u03c4\u03b5 \u03c9\u03c2 Spring configuration:<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">public class ContainerInit implements ApplicationContextInitializer {\n\n  public static Postgres13TC postgres13TC,\n\n  static {\n    postgres13TC = Postgres13TC.getInstance(),\n    postgres13TC.start(),\n  }\n\n  @Override\n  public void initialize(ConfigurableApplicationContext applicationContext) {\n    TestPropertySourceUtils.addInlinedPropertiesToEnvironment(\n        applicationContext,\n        \"spring.datasource.url=\" + postgres13TC.getJdbcUrl(),\n        \"spring.datasource.username=\" + postgres13TC.getUsername(),\n        \"spring.datasource.password=\" + postgres13TC.getPassword(),\n        \"db.host=\" + postgres13TC.getHost(),\n        \"db.port=\" + postgres13TC.getMappedPort(postgres13TC.POSTGRESQL_PORT),\n        \"db.name=\" + postgres13TC.getDatabaseName(),\n        \"db.username=\" + postgres13TC.getUsername(),\n        \"db.password=\" + postgres13TC.getPassword()\n    );\n  }\n}<\/code><\/pre>\n\n\n\n<p>\u03a4\u03ad\u03bb\u03bf\u03c2, \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03ad\u03c3\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ae \u03bc\u03b1\u03c2 \u03ba\u03b1\u03b9 \u03cc\u03bb\u03b1 \u03b8\u03b1 \u03be\u03b5\u03ba\u03b9\u03bd\u03ae\u03c3\u03bf\u03c5\u03bd \u03ba\u03ac\u03c4\u03c9 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03ba\u03bf\u03c5\u03ba\u03bf\u03cd\u03bb\u03b1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">@SpringBootTest(webEnvironment = RANDOM_PORT)\n@AutoConfigureTestDatabase(replace = NONE)\n@ContextConfiguration(initializers = ContainerInit.class)\n@Testcontainers\nclass DummyRepositoryTest {\n\n  @Autowired\n  private DummyRepository dummyRepository,\n\n  @Test\n  void shouldReturnDummy() {\n    var byId = dummyRepository.getById(10L),\n    var expected = new Dummy(),\n    expected.setId(10L),\n    assertThat(byId).completes().emitsCount(1).emits(expected),\n  }\n}<\/code><\/pre>\n\n\n\n<p><code>\u0389 \u03b1\u03bd \u03b8\u03ad\u03bb\u03bf\u03c5\u03bc\u03b5 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03ad\u03c3\u03bf\u03c5\u03bc\u03b5 \u03b1\u03bd\u03b5\u03be\u03ac\u03c1\u03c4\u03b7\u03c4\u03bf \u03c4\u03b5\u03c3\u03c4 \u03c4\u03b7\u03c2 Spring, \u03bc\u03c0\u03bf\u03c1\u03bf\u03cd\u03bc\u03b5 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03bf\u03c5\u03bc\u03b5 \u03b1\u03c0\u03b5\u03c5\u03b8\u03b5\u03af\u03b1\u03c2 \u03c4\u03bf container:<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">@Testcontainers\nclass SimpleDbTest {\n\n  @Container\n  private static final Postgres13TC postgres13TC = Postgres13TC.getInstance(),\n\n  @Test\n  void testConnection() {\n    assumeThat(postgres13TC.isRunning()),\n    var connectionProps = new Properties(),\n    connectionProps.put(\"user\", postgres13TC.getUsername()),\n    connectionProps.put(\"password\", postgres13TC.getPassword()),\n    try (Connection connection = DriverManager.getConnection(postgres13TC.getJdbcUrl(),\n        connectionProps)) {\n    var resultSet = connection.prepareStatement(\"Select 1\").executeQuery(),\n    resultSet.next(),\n    assertThat(resultSet.getInt(1)).isEqualTo(1),\n    } catch (SQLException sqlException) {\n    assertThat((Exception) sqlException).doesNotThrowAnyException(),\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u03a3\u03c5\u03bd\u03bf\u03c8\u03af\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2<\/h2>\n\n\n\n<p>\u03a4\u03b1 Testcontainers \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03bf\u03bb\u03cd \u03b5\u03cd\u03c7\u03c1\u03b7\u03c3\u03c4\u03b1 \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03b1 \u03c0\u03bf\u03c5 \u03b2\u03bf\u03b7\u03b8\u03bf\u03cd\u03bd <a href=\"https:\/\/thecodest.co\/el\/blog\/why-us-companies-are-opting-for-polish-developers\/\">us<\/a> \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ce\u03bd \u03bf\u03bb\u03bf\u03ba\u03bb\u03ae\u03c1\u03c9\u03c3\u03b7\u03c2 \u03c0\u03bf\u03c5 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bd <a href=\"https:\/\/thecodest.co\/el\/dictionary\/docker-developer\/\">Docker<\/a> \u03b5\u03bc\u03c0\u03bf\u03c1\u03b5\u03c5\u03bc\u03b1\u03c4\u03bf\u03ba\u03b9\u03b2\u03ce\u03c4\u03b9\u03b1. \u0391\u03c5\u03c4\u03cc \u03bc\u03b1\u03c2 \u03b4\u03af\u03bd\u03b5\u03b9 \u03bc\u03b5\u03b3\u03b1\u03bb\u03cd\u03c4\u03b5\u03c1\u03b7 \u03b5\u03c5\u03b5\u03bb\u03b9\u03be\u03af\u03b1 \u03ba\u03b1\u03b9 \u03b1\u03c5\u03be\u03ac\u03bd\u03b5\u03b9 \u03c4\u03b7\u03bd \u03c4\u03b1\u03c7\u03cd\u03c4\u03b7\u03c4\u03b1 \u03b1\u03bd\u03ac\u03c0\u03c4\u03c5\u03be\u03b7\u03c2. \u0397 \u03c3\u03c9\u03c3\u03c4\u03ae \u03c1\u03cd\u03b8\u03bc\u03b9\u03c3\u03b7 \u03c4\u03b7\u03c2 \u03b4\u03b9\u03b1\u03bc\u03cc\u03c1\u03c6\u03c9\u03c3\u03b7\u03c2 \u03c4\u03c9\u03bd \u03b4\u03bf\u03ba\u03b9\u03bc\u03ce\u03bd \u03bc\u03b5\u03b9\u03ce\u03bd\u03b5\u03b9 \u03c4\u03bf \u03c7\u03c1\u03cc\u03bd\u03bf \u03c0\u03bf\u03c5 \u03b1\u03c0\u03b1\u03b9\u03c4\u03b5\u03af\u03c4\u03b1\u03b9 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03b9\u03b2\u03af\u03b2\u03b1\u03c3\u03b7 \u03bd\u03ad\u03c9\u03bd \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03ce\u03bd. \u0394\u03b5\u03bd \u03c7\u03c1\u03b5\u03b9\u03ac\u03b6\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03c1\u03c5\u03b8\u03bc\u03af\u03c3\u03bf\u03c5\u03bd \u03cc\u03bb\u03b5\u03c2 \u03c4\u03b9\u03c2 \u03b5\u03be\u03b1\u03c1\u03c4\u03ae\u03c3\u03b5\u03b9\u03c2, \u03b1\u03c0\u03bb\u03ce\u03c2 \u03b5\u03ba\u03c4\u03b5\u03bb\u03bf\u03cd\u03bd \u03c4\u03b9\u03c2 \u03b3\u03c1\u03b1\u03c0\u03c4\u03ad\u03c2 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 \u03bc\u03b5 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03b4\u03b9\u03b1\u03bc\u03cc\u03c1\u03c6\u03c9\u03c3\u03b7\u03c2.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/thecodest.co\/contact\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/interested_in_cooperation_.png\" alt=\"\u03c0\u03b1\u03bd\u03cc \u03c3\u03c5\u03bd\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2\"\/><\/a><\/figure>","protected":false},"excerpt":{"rendered":"<p>\u039c\u03ac\u03b8\u03b5\u03c4\u03b5 \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 \u03c6\u03bf\u03c1\u03bc\u03ce\u03bd \u03ba\u03bf\u03bd\u03c4\u03ad\u03b9\u03bd\u03b5\u03c1 \u03c3\u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03bc\u03b1\u03c2 \u03c3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03b7 Java, \u03cc\u03c0\u03bf\u03c5 \u03bf \u03b1\u03bd\u03ce\u03c4\u03b5\u03c1\u03bf\u03c2 \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03ae\u03c2 \u03bc\u03b1\u03c2 \u03c3\u03c4\u03b7 java \u03b4\u03b5\u03af\u03c7\u03bd\u03b5\u03b9 \u03cc\u03bb\u03b7 \u03c4\u03b7 \u03bc\u03b1\u03b3\u03b5\u03af\u03b1.<\/p>","protected":false},"author":2,"featured_media":3529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Quick Guide on How to Run Containers from Tests - The Codest<\/title>\n<meta name=\"description\" content=\"Learn how to run containers form tests in our Java related article where our senior java developer shows all the magic.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/el\/blog\/\u03b3\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2-\u03bf\u03b4\u03b7\u03b3\u03cc\u03c2-\u03b3\u03b9\u03b1-\u03c4\u03bf-\u03c0\u03ce\u03c2-\u03bd\u03b1-\u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\/\" \/>\n<meta property=\"og:locale\" content=\"el_GR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quick Guide on How to Run Containers from Tests\" \/>\n<meta property=\"og:description\" content=\"Learn how to run containers form tests in our Java related article where our senior java developer shows all the magic.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/el\/blog\/\u03b3\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2-\u03bf\u03b4\u03b7\u03b3\u03cc\u03c2-\u03b3\u03b9\u03b1-\u03c4\u03bf-\u03c0\u03ce\u03c2-\u03bd\u03b1-\u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-16T11:43:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T05:56:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Quick Guide on How to Run Containers from Tests\",\"datePublished\":\"2022-08-16T11:43:43+00:00\",\"dateModified\":\"2026-03-11T05:56:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/\"},\"wordCount\":124,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/quick_guide_on_how_to_run_containers_from_tests.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"el\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/\",\"name\":\"Quick Guide on How to Run Containers from Tests - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/quick_guide_on_how_to_run_containers_from_tests.png\",\"datePublished\":\"2022-08-16T11:43:43+00:00\",\"dateModified\":\"2026-03-11T05:56:42+00:00\",\"description\":\"Learn how to run containers form tests in our Java related article where our senior java developer shows all the magic.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#breadcrumb\"},\"inLanguage\":\"el\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"el\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/quick_guide_on_how_to_run_containers_from_tests.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/quick_guide_on_how_to_run_containers_from_tests.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/quick-guide-on-how-to-run-containers-from-tests\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quick Guide on How to Run Containers from Tests\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"el\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"el\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"el\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/el\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u0393\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2 \u03bf\u03b4\u03b7\u03b3\u03cc\u03c2 \u03b3\u03b9\u03b1 \u03c4\u03bf \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 Containers \u03b1\u03c0\u03cc \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 - The Codest","description":"\u039c\u03ac\u03b8\u03b5\u03c4\u03b5 \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 \u03c6\u03bf\u03c1\u03bc\u03ce\u03bd \u03ba\u03bf\u03bd\u03c4\u03ad\u03b9\u03bd\u03b5\u03c1 \u03c3\u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03bc\u03b1\u03c2 \u03c3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03b7 Java, \u03cc\u03c0\u03bf\u03c5 \u03bf \u03b1\u03bd\u03ce\u03c4\u03b5\u03c1\u03bf\u03c2 \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03ae\u03c2 \u03bc\u03b1\u03c2 \u03c3\u03c4\u03b7 java \u03b4\u03b5\u03af\u03c7\u03bd\u03b5\u03b9 \u03cc\u03bb\u03b7 \u03c4\u03b7 \u03bc\u03b1\u03b3\u03b5\u03af\u03b1.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/el\/blog\/\u03b3\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2-\u03bf\u03b4\u03b7\u03b3\u03cc\u03c2-\u03b3\u03b9\u03b1-\u03c4\u03bf-\u03c0\u03ce\u03c2-\u03bd\u03b1-\u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\/","og_locale":"el_GR","og_type":"article","og_title":"Quick Guide on How to Run Containers from Tests","og_description":"Learn how to run containers form tests in our Java related article where our senior java developer shows all the magic.","og_url":"https:\/\/thecodest.co\/el\/blog\/\u03b3\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2-\u03bf\u03b4\u03b7\u03b3\u03cc\u03c2-\u03b3\u03b9\u03b1-\u03c4\u03bf-\u03c0\u03ce\u03c2-\u03bd\u03b1-\u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\/","og_site_name":"The Codest","article_published_time":"2022-08-16T11:43:43+00:00","article_modified_time":"2026-03-11T05:56:42+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Quick Guide on How to Run Containers from Tests","datePublished":"2022-08-16T11:43:43+00:00","dateModified":"2026-03-11T05:56:42+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/"},"wordCount":124,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png","articleSection":["Software Development"],"inLanguage":"el","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/","url":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/","name":"\u0393\u03c1\u03ae\u03b3\u03bf\u03c1\u03bf\u03c2 \u03bf\u03b4\u03b7\u03b3\u03cc\u03c2 \u03b3\u03b9\u03b1 \u03c4\u03bf \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 Containers \u03b1\u03c0\u03cc \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png","datePublished":"2022-08-16T11:43:43+00:00","dateModified":"2026-03-11T05:56:42+00:00","description":"\u039c\u03ac\u03b8\u03b5\u03c4\u03b5 \u03c0\u03ce\u03c2 \u03bd\u03b1 \u03b5\u03ba\u03c4\u03b5\u03bb\u03b5\u03af\u03c4\u03b5 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ad\u03c2 \u03c6\u03bf\u03c1\u03bc\u03ce\u03bd \u03ba\u03bf\u03bd\u03c4\u03ad\u03b9\u03bd\u03b5\u03c1 \u03c3\u03c4\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03bc\u03b1\u03c2 \u03c3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03b7 Java, \u03cc\u03c0\u03bf\u03c5 \u03bf \u03b1\u03bd\u03ce\u03c4\u03b5\u03c1\u03bf\u03c2 \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03ae\u03c2 \u03bc\u03b1\u03c2 \u03c3\u03c4\u03b7 java \u03b4\u03b5\u03af\u03c7\u03bd\u03b5\u03b9 \u03cc\u03bb\u03b7 \u03c4\u03b7 \u03bc\u03b1\u03b3\u03b5\u03af\u03b1.","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#breadcrumb"},"inLanguage":"el","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/"]}]},{"@type":"ImageObject","inLanguage":"el","@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/quick_guide_on_how_to_run_containers_from_tests.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/quick-guide-on-how-to-run-containers-from-tests\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Quick Guide on How to Run Containers from Tests"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"el"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"el","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"el","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/el\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/posts\/3528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/comments?post=3528"}],"version-history":[{"count":9,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/posts\/3528\/revisions"}],"predecessor-version":[{"id":7964,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/posts\/3528\/revisions\/7964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/media\/3529"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/media?parent=3528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/categories?post=3528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/el\/wp-json\/wp\/v2\/tags?post=3528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}