This is an example repository with a simple test confirming proper connection from Testcontainers Desktop (or the CI agent) to your Testcontainers Cloud account. For details on how to bootstrap Testcontainers in an actual project, please refer to the Testcontainers Node Quickstart.
git clone https://github.com/AtomicJar/testcontainers-cloud-nodejs-example
cd testcontainers-cloud-nodejs-example
make testThe Make command will install the dependencies and run the test suite.
npm test
Test output:
console.log
ββββββββββββββββββββββββββββββββββ βββββββ βββββββ ββββ ββββββββββββ ββββββ βββββββ ββββββββββββββββββ ββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ
βββ ββββββ ββββββββ βββ βββ βββ βββββββββ βββ βββ βββββββββββββββββ βββββββββ ββββββββββββββββ
βββ ββββββ ββββββββ βββ βββ βββ βββββββββββββ βββ βββββββββββββββββββββββββββ ββββββββββββββββ
βββ ββββββββββββββββ βββ ββββββββββββββββββββ ββββββ βββ βββ βββββββββ βββββββββββββββββ βββββββββββ
βββ ββββββββββββββββ βββ βββββββ βββββββ βββ βββββ βββ βββ βββββββββ ββββββββββββββββ βββββββββββ
Congratulations on running your first test! π
Runtime used:
Testcontainers Cloud via Testcontainers Desktop
You can now return to the website to complete your onboarding.
at Object.log (src/TestcontainersCloud.test.js:55:17)
PASS src/TestcontainersCloud.test.js (17.199 s)
GenericContainer
β tcc cloud engine (5456 ms)
β create postgresql container (11411 ms)
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 17.22 sTestcontainers Desktop helps developers with common tasks such as debugging your Testcontainers-powered dependencies. Let's practice!
The tests in this project create a PostgreSQL database and populate it with sample data. You can
set a fixed port
for the postgres service, then freeze containers shutdown
to easily connect to the database from your IDE after your tests run.
See if you can inspect the database. Username: test. Password: test.