{"id":21512178,"url":"https://github.com/iiroki/samples-testcontainers","last_synced_at":"2026-04-11T00:43:19.760Z","repository":{"id":234707862,"uuid":"789400925","full_name":"iiroki/samples-testcontainers","owner":"iiroki","description":"Testcontainers samples with various languages.","archived":false,"fork":false,"pushed_at":"2024-05-21T16:09:34.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T01:46:20.674Z","etag":null,"topics":["docker","dotnet","nodejs","testcontainers","testing","typescript"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iiroki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-20T12:49:59.000Z","updated_at":"2024-05-21T16:09:37.000Z","dependencies_parsed_at":"2024-04-20T14:06:21.421Z","dependency_job_id":"ec9ffd07-3855-4145-a2c9-b06f3f44e4dc","html_url":"https://github.com/iiroki/samples-testcontainers","commit_stats":null,"previous_names":["iiroki/testcontainers-samples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiroki%2Fsamples-testcontainers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiroki%2Fsamples-testcontainers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiroki%2Fsamples-testcontainers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiroki%2Fsamples-testcontainers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iiroki","download_url":"https://codeload.github.com/iiroki/samples-testcontainers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056930,"owners_count":20390804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dotnet","nodejs","testcontainers","testing","typescript"],"created_at":"2024-11-23T22:29:56.047Z","updated_at":"2025-12-31T00:17:41.459Z","avatar_url":"https://github.com/iiroki.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Samples: Testcontainers\n\n[![.NET Test](https://github.com/iiroki/samples-testcontainers/actions/workflows/dotnet-test.yml/badge.svg)](https://github.com/iiroki/samples-testcontainers/actions/workflows/dotnet-test.yml)\n[![Node Test](https://github.com/iiroki/samples-testcontainers/actions/workflows/node-test.yml/badge.svg)](https://github.com/iiroki/samples-testcontainers/actions/workflows/node-test.yml)\n\n[**Testcontainers**](https://testcontainers.com/) is an open source framework for\nrunning test dependencies as Docker containers.\n\nThe repository contains few samples on how to get started with Testcontainers with various languages.\n\n## Tools\n\nThe samples in the repository depend on the following tools:\n- Docker (required by Testcontainers)\n- Language-specific SDKs (see [\"Languages\"](#languages) below)\n\n## Languages\n\n### .NET\n\n**Version:** .NET 8\n\n.NET samples are located under [`dotnet/`](./dotnet/).\n\n#### Structure\n\nThe sample .NET solution consist of three projects:\n\n- **[`Samples.Testcontainers`](./dotnet/Samples.Testcontainers/):** The actual project that's tested\n- **[`Samples.Testcontainers.Tests.Nunit`](./dotnet/Samples.Testcontainers.Tests.Nunit/):**\n  [NUnit](https://nunit.org/) samples:\n    - Postgres\n- **[`Samples.Testcontainers.Tests.Xunit`](./dotnet/Samples.Testcontainers.Tests.Xunit/):**\n  [xUnit](https://xunit.net/) samples:\n    - Postgres\n    - Blob Storage (= Azurite)\n    - Postgres + Blob Storage (both used at the same time)\n\n\nOnly test projects have references to the tested project, not the other way around!\n\n#### Commands\n\n- Run all tests from the solution:\n    ```bash\n    dotnet test\n    ```\n\n- Run tests from a specific project:\n    ```bash\n    dotnet test \u003cproject_name\u003e\n    ```\n\n#### Notes\n\n- The samples utilize `InternalsVisibleToAttribute` to expose internal objects to the test projects,\n  see [`Samples.Testcontainers.csproj`](./dotnet/Samples.Testcontainers/Samples.Testcontainers.csproj) for the usage.\n\n### Node/TypeScript\n\n**Version:** Node 20\n\nNode samples are located under [`node/`](./node/).\n\n#### Structure\n\nThe Node project contains a simple Postgres example with Testcontainers.\n\n#### Commands\n\nRun all tests:\n```bash\nnpm test\n```\n\n## CI\n\nThe repository also demonstrates how to use Testcontainers in CI pipelines with GitHub Actions.\n\nIntegrating Testcontainers to CI pipelines is as almost as easy it can get,\nsince the tests can just be executed with the chosen language's standard test commands\nwithout any extra configuration!\n\nThe GitHub Actions CI pipelines are located under [`.github/workflows`](./.github/workflows/):\n- **[`dotnet-test.yml`](./.github/workflows/dotnet-test.yml):** .NET CI pipeline\n    - Runs NUnit and xUnit tests separately and then together at the same time.\n- **[`node-test.yml`](./.github/workflows/node-test.yml):** Node CI pipeline\n    - Runs tests with Jest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiiroki%2Fsamples-testcontainers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiiroki%2Fsamples-testcontainers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiiroki%2Fsamples-testcontainers/lists"}