467,877 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Discussion: Test containers or test doubles (comparison inside)

2Bits
When testing flows that start with a message from a queue, or ends by publishing a message to the queue, would you prefer testing against a real server (e.g. using test containers) or stub the MQ client (e.g. using mockito)?

I started to craft a comparison table between the two, could be nice to discusss the trade-off
1 Week Ago #1
  • viewed: 1392
Share:
1 Reply
16bit
Depends on the use case right?

Running your test against real servers make more sense if the code is being shipped in a live service and there are enough resources to run the containers for running tests.

It's still an automated test that runs against a more production like environment
https://www.testcontainers.org

Mocktio is great for testing code when shipping code that you might be selling or open sourcing where you don't know how the end user will use the code and you just want to make sure everything works on each release.
1 Week Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

20 posts views Thread by Alexander Muylaert | last post: by
1 post views Thread by Graham Smith | last post: by
1 post views Thread by Christopher Corbell | last post: by
27 posts views Thread by brad | last post: by
reply views Thread by =?Utf-8?B?TU9QU0M=?= | last post: by
reply views Thread by jack112 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.