Elastic.TUnit.Elasticsearch.Core 0.13.0

Prefix Reserved
dotnet add package Elastic.TUnit.Elasticsearch.Core --version 0.13.0
                    
NuGet\Install-Package Elastic.TUnit.Elasticsearch.Core -Version 0.13.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Elastic.TUnit.Elasticsearch.Core" Version="0.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Elastic.TUnit.Elasticsearch.Core" Version="0.13.0" />
                    
Directory.Packages.props
<PackageReference Include="Elastic.TUnit.Elasticsearch.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Elastic.TUnit.Elasticsearch.Core --version 0.13.0
                    
#r "nuget: Elastic.TUnit.Elasticsearch.Core, 0.13.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Elastic.TUnit.Elasticsearch.Core@0.13.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Elastic.TUnit.Elasticsearch.Core&version=0.13.0
                    
Install as a Cake Addin
#tool nuget:?package=Elastic.TUnit.Elasticsearch.Core&version=0.13.0
                    
Install as a Cake Tool

Elastic.TUnit.Elasticsearch.Core

Most users should depend on Elastic.TUnit.Elasticsearch instead.

This is the barebones core package. It provides cluster lifecycle, skip attributes, test hooks, and bootstrap diagnostics for TUnit — but does not include Elastic.Clients.Elasticsearch.

You should only depend on this package directly if you are sure you will not use Elastic.Clients.Elasticsearch. For example:

  • You are using a different Elasticsearch client (e.g. the low-level Elastic.Transport client, a custom HTTP client, or a third-party library)
  • You are testing cluster infrastructure itself and never need a typed client
  • You are building your own convenience layer on top of this package

For everyone else — which is the vast majority of users — use Elastic.TUnit.Elasticsearch. It depends on this package transitively and adds:

  • A non-generic ElasticsearchCluster base class with a default ElasticsearchClient
  • The .WireTUnitOutput() extension for ElasticsearchClientSettings
  • One-liner cluster definitions like public class MyCluster() : ElasticsearchCluster("latest-9");

What's in this package

  • ElasticsearchCluster<TConfiguration> — generic cluster base with TUnit lifecycle integration
  • ElasticsearchConfiguration — cluster configuration with bootstrap diagnostics settings
  • ExternalClusterConfiguration — connection details for remote Elasticsearch clusters
  • ElasticsearchClusterExtensionsGetOrAddClient helpers for caching any client type
  • ElasticsearchTestHooks — global [BeforeEvery(Test)] hook for skip evaluation
  • ElasticsearchTestBase<TCluster> — optional convenience base class
  • ElasticsearchParallelLimit — default parallel limiter
  • SkipVersionAttribute / SkipTestAttribute — version-based and custom skip conditions
  • Bootstrap diagnostics writers (ANSI console, progress heartbeat)

External cluster support

ElasticsearchCluster<TConfiguration> supports skipping ephemeral cluster startup when a remote Elasticsearch instance is already available. This significantly speeds up development feedback loops since you don't need to wait for Elasticsearch to bootstrap on every test run.

The resolution order during InitializeAsync() is:

  1. Programmatic hook — override TryUseExternalCluster() to return an ExternalClusterConfiguration, or null to fall through
  2. Environment variables — set TEST_ELASTICSEARCH_URL (and optionally TEST_ELASTICSEARCH_API_KEY)
  3. Ephemeral startup — download, install, and start Elasticsearch locally

When using an external cluster:

  • NodesUris() returns the external URI
  • IsExternal is true
  • ExternalApiKey contains the API key (if provided)
  • Dispose() is a no-op (the remote cluster is not managed)
  • Connectivity is validated with a GET / before tests run

Dependencies

  • TUnit.Core
  • Elastic.Elasticsearch.Ephemeral

No dependency on Elastic.Clients.Elasticsearch.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Elastic.TUnit.Elasticsearch.Core:

Package Downloads
Elastic.TUnit.Elasticsearch

TUnit integration for Elasticsearch — ephemeral clusters with a pre-configured ElasticsearchClient. This is the recommended package for most users.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.13.0 121 2/22/2026
0.12.2 323 2/19/2026