Testcontainers
Hacker ApprovedRanked 4 of 8 testing frameworks by recommenders
Starts real databases and services in Docker containers for tests, so people skip mocks and in-memory stand-ins. Main caveat: some worry about images pulled from Docker Hub.
Starts real databases and services in Docker containers for tests, so people skip mocks and in-memory stand-ins. Main caveat: some worry about images pulled from Docker Hub.
17 people gave an opinion
- recommend it
- 14
- criticize it
- 3
- approval share
- 82%
Recommended in 8 of 13 months
- November 2025: not recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: not recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 14 people recommend itNeeds 10 or more, met.
- 4.7 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 8 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Runs tests against real databases
“Testcontainers are great for tests in particular when you don't want to use some mocked in-memory DB”
Comment from 19 Aug 2026 in “PostgreSQL for Everything” “because it's not fully Postgres, I've switched entirely to TestContainers”
Comment from 5 Jan 2026 in “Databases in 2025: A Year in Review” “I'm using them for integration tests that need Postgres.”
Comment from 29 Dec 2025 in “Show HN: Superset – Terminal to run 10 parallel coding agents” - Comment from 24 Jul 2026 in “How Do We Stop Vibe Coding?”
Starts real services for integration tests
“It uses Testcontainers to start and autowire runtime deps (postgres, redis, keycloak, etc.).”
Comment from 25 Feb 2026 in “Show HN: Django Control Room – All Your Tools Inside the Django Admin” “introduce Testcontainers and load testing tools and anything else that makes sense”
Comment from 17 Aug 2026 in “Amodei Re. Regulation” “always run tests running real infra like testcontainers”
Comment from 13 May 2026 in “Learning Software Architecture” - Comment from 29 Mar 2026 in “Show HN: Grafana TUI – Browse Grafana dashboards in the terminal”
What people warn about
Each mark is one comment
Images pulled from Docker Hub
“people find out testcontainers or whatever is pulling from docker hub rather than the company registry”
Comment from 16 May 2026 in “'No Way to Prevent This,' Says Only Package Manager Where This Regularly Happens”
Other testing frameworks people recommend
The four most recommended other testing frameworks, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| Mockito | 19 | 13 | 59% | 3 | 4 yrs4 owners | — |
| cargo-nextest | 18 | 1 | 95% | 3 | — | — |
| Vitest | 17 | 8 | 68% | 8 | — | Approved |
| TestcontainersThis page | 14 | 3 | 82% | 8 | — | Approved |
| pytest | 12 | 5 | 71% | 9 | — | Approved |
What people said
17 of the 19 comments that mention it, newest first. Each links to the original comment.
“Testcontainers are great for tests in particular when you don't want to use some mocked in-memory DB”
“introduce Testcontainers and load testing tools and anything else that makes sense”
“It's saved a massive amount of time waiting for my tests to run over the years”
“introduced Testcontainers to actually do proper DB tests”
“testcontainers is great for ensuring multiple agents can run tests that don't conflict”
“people find out testcontainers or whatever is pulling from docker hub rather than the company registry”
“always run tests running real infra like testcontainers”
“you can't use testcontainers”
“cool to see testcontainers for integration tests”
“It's just too much hassle to replicate cloud environments locally”
“It uses Testcontainers to start and autowire runtime deps (postgres, redis, keycloak, etc.).”
“test containers are not the way.”
“because it's not fully Postgres, I've switched entirely to TestContainers”
“I'm using them for integration tests that need Postgres.”
“testcontainers is glue that can use that existing container runtime setup”
“our application recovers to the reset database state seamlessly”
“I’ve had incredible success with testcontainers for local unit-testing”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.