openrewrite / openrewrite/rewrite-testing-frameworks
Testcontainers best practices recipes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 100
- Forks
- 105
- Avg merge
- 2h 25m
- Merged PRs (30d)
- 9
Description
Based on this nice article from @sivaprasadreddy
https://www.atomicjar.com/2023/11/testcontainers-best-practices/
What problem are you trying to solve?
Automate some of the best practices for testcontainers, such that users can adopt these with little effort, unlocking a move to testcontainers cloud in some areas.
- Don’t rely on fixed ports for tests
- Don’t hardcode the hostname
- Don’t hardcode the container name
- Copy files into containers instead of mounting them
- Use the same container versions as in production
- Use proper container lifecycle strategy
- Leverage your framework’s integration for Testcontainers
- User preconfigured technology-specific modules when possible
- Use WaitStrategies to check the container is ready
Any additional context
In part also discussed on
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files, tests, or entry points are named; start by reviewing the repository structure and the linked discussion in rewrite-testing-frameworks/pull/433. The work would be complete when the agreed Testcontainers best practices are represented by maintainable recipes, with coverage for the checklist items in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100