ChromaDotNet.Testcontainers
0.1.7
Prefix Reserved
dotnet add package ChromaDotNet.Testcontainers --version 0.1.7
NuGet\Install-Package ChromaDotNet.Testcontainers -Version 0.1.7
<PackageReference Include="ChromaDotNet.Testcontainers" Version="0.1.7" />
<PackageVersion Include="ChromaDotNet.Testcontainers" Version="0.1.7" />
<PackageReference Include="ChromaDotNet.Testcontainers" />
paket add ChromaDotNet.Testcontainers --version 0.1.7
#r "nuget: ChromaDotNet.Testcontainers, 0.1.7"
#:package ChromaDotNet.Testcontainers@0.1.7
#addin nuget:?package=ChromaDotNet.Testcontainers&version=0.1.7
#tool nuget:?package=ChromaDotNet.Testcontainers&version=0.1.7
ChromaDB.Testcontainers
A Testcontainers for .NET module for Chroma, published as the ChromaDotNet.Testcontainers package. It starts a throwaway Chroma container in your tests.
This is a community project. It is not affiliated with or endorsed by Testcontainers or Chroma.
Website: chromadotnet.org
Usage
dotnet add package ChromaDotNet.Testcontainers
using Testcontainers.Chroma;
await using var chroma = new ChromaBuilder("chromadb/chroma:1.5.9").Build();
await chroma.StartAsync();
// The base address of the Chroma API, like http://localhost:32768/
var address = chroma.GetConnectionString();
GetBaseAddress() returns the same address. ChromaBuilder.ChromaHttpPort is the API port inside the container, 8000.
With ChromaDB.Client, the ChromaDotNet.Client package:
using ChromaDB.Client;
using var httpClient = new HttpClient();
var options = new ChromaConfigurationOptions(chroma.GetConnectionString());
var client = new ChromaClient(options, httpClient);
var collection = await client.CreateCollectionAsync("documents");
The container is ready when the Chroma API answers its heartbeat: the v2 API from Chroma 0.5.16, the v1 API on earlier releases. So the module works with any Chroma image, whatever its tag.
Building and testing
dotnet build ChromaDB.Testcontainers.slnx
dotnet test tests/Testcontainers.Chroma.Tests
CHROMA_IMAGE=chromadb/chroma:0.4.10 dotnet test tests/Testcontainers.Chroma.ImageTests
The tests start Chroma in containers, so they need Docker. tests/Testcontainers.Chroma.ImageTests runs on the image in CHROMA_IMAGE, and the CI sets it to each Chroma release it tests.
Origin
The module follows the structure and conventions of the Testcontainers for .NET modules, so that it can become one of them:
- the code and the tests started as a copy of its Qdrant module, under the MIT license;
- docs/modules/chroma.md is the page proposed for its documentation site. It names the package
Testcontainers.Chromathat Testcontainers for .NET would publish, and its--8<--lines include the code when that site is built.
Here the package is ChromaDotNet.Testcontainers.
It is proposed to Testcontainers for .NET in testcontainers/testcontainers-dotnet#1784. This repository publishes it until Testcontainers for .NET ships Testcontainers.Chroma. Then this repository will be archived, and the package deprecated in favor of that one. The namespace and the API are the same, so moving changes only the package reference.
Every change to the module goes first into that pull request. eng/sync-from-upstream.sh then copies src/Testcontainers.Chroma, tests/Testcontainers.Chroma.Tests and docs/modules/chroma.md here. The rest belongs to this repository, like the build files, the CI and tests/Testcontainers.Chroma.ImageTests.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Testcontainers (>= 4.15.0)
-
.NETStandard 2.1
- Testcontainers (>= 4.15.0)
-
net10.0
- Testcontainers (>= 4.15.0)
-
net8.0
- Testcontainers (>= 4.15.0)
-
net9.0
- Testcontainers (>= 4.15.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.7 | 2,210 | 10/7/2026 |
