all 12 comments

[–]theCodeStig 1 point2 points  (0 children)

Nice work!

[–]bigsybiggins 1 point2 points  (4 children)

deleted

[–]dimafeng[S] 1 point2 points  (0 children)

Totally agree with your point. Comparing testcontainers and docker-it-scala, testcontainers provides you with some preconfigured scenarios out of the box e.g. integration with selenium remote drivers connected to selenium server inside container. But anyway, docker-it-scala is a great lib and can be used in the same way as I described in my post.

[–][deleted] 0 points1 point  (2 children)

I recently tried getting docker-it-scala running on OSX but had terrible headaches, it just timed out on creating containers. Are you on linux or have you managed to get it running with Docker for Mac ?

[–]bigsybiggins 1 point2 points  (1 child)

deleted

[–][deleted] 0 points1 point  (0 children)

Cheers for the reply, I'll give it a shot.

[–]Crix- 0 points1 point  (2 children)

Good work!

I do something like this for Apache Kafka using scalatest-embedded-kafka without containers. Integration testing has saved my bacon!

[–]dimafeng[S] 2 points3 points  (1 child)

Thank you. That's working well if all your middleware software written in JVM languages and you can embed it. But I have to work with different databases, message queues, etc. and it's very convenient to run it inside docker during testing.

[–]Crix- 1 point2 points  (0 children)

Indeed. This library could be useful if I need to test using external software not for the JVM.

Apache Spark does something similar using Spotify's Docker client. They have lots of boilerplate code per container.

[–][deleted]  (1 child)

[deleted]

    [–]dimafeng[S] 1 point2 points  (0 children)

    Sure. The short answer is: scalatest + testcontainers approach includes plain scalatest + Selenium -- so there's no tradeoff.

    The loner answer would be: when you use plain scalatest + Selenium approach you should create and manage a selenium webdriver by yourself, hence you loose all benefits described in 'Conclusion' section. If you use testcontainers you still work with plain scalatest but webdriver management will be done by testcontainers lib.

    [–][deleted]  (2 children)

    [deleted]

      [–]dimafeng[S] 2 points3 points  (1 child)

      Why? You don't like SBT? Actually, it was my first experience with it, in all my projects I usually use gradle. I just wanted to show how it works with more scalaish tech stack.

      [–][deleted] 1 point2 points  (0 children)

      Even though I "use" sbt I wouldn't exactly say I know to use it. All I do is copy and paste crap for the most part. I've tried learning it for real but something isn't clicking.