Why didn't you choose Testcontainers?
sobes.tech AI
Answer from AI
Reasons for not using Testcontainers can vary, but the main ones are:
-
Complexity and overhead: Testcontainers runs real Docker containers for tests, which requires a Docker environment and can slow down tests.
-
Dependence on external services: In some projects, it is undesirable to have external dependencies in tests to ensure their stability and reproducibility.
-
Control and customization: Sometimes, more fine-tuned configuration of the test environment is needed, which is difficult to achieve with Testcontainers.
-
Compatibility and infrastructure: In some CI/CD environments or on developer machines, Docker support may be absent, making the use of Testcontainers impossible.
-
Simplicity of alternatives: If tests can be covered with mocks or built-in test databases, using Testcontainers may be excessive.
Thus, the refusal of Testcontainers is often related to a balance between convenience, test speed, and infrastructure and stability requirements.