![]() |
VOOZH | about |
dotnet add package RavenDB.TestDriver --version 7.2.4
NuGet\Install-Package RavenDB.TestDriver -Version 7.2.4
<PackageReference Include="RavenDB.TestDriver" Version="7.2.4" />
<PackageVersion Include="RavenDB.TestDriver" Version="7.2.4" />Directory.Packages.props
<PackageReference Include="RavenDB.TestDriver" />Project file
paket add RavenDB.TestDriver --version 7.2.4
#r "nuget: RavenDB.TestDriver, 7.2.4"
#:package RavenDB.TestDriver@7.2.4
#addin nuget:?package=RavenDB.TestDriver&version=7.2.4Install as a Cake Addin
#tool nuget:?package=RavenDB.TestDriver&version=7.2.4Install as a Cake Tool
You're looking at RavenDB Test Driver Client (SDK) NuGet release.
It makes it easy to write tests that require RavenDB instance, leveraging embedded server and providing you friendly API.
RavenDB is a NoSQL database that fuses extreme performance with ease-of-use, offering above the roof developer experience.
Learn more at https://ravendb.net or visit our GitHub repository.
Get the latest stable version from NuGet.
var testServerOptions = new TestServerOptions
{
// Looks for the newest version on your machine including 3.1.15 and any newer patches
// but not major new releases (default is .NET version at time of server release).
FrameworkVersion = "3.1.15+",
// Specifies where ravendb server binaries are located (Optional)
ServerDirectory = "PATH_TO_RAVENDB_SERVER",
// Specifies where ravendb data will be placed/located (Optional)
DataDirectory = "PATH_TO_RAVENDB_DATADIR",
};
ConfigureServer(testServerOptions);
using Raven.Client.Documents;
using Raven.TestDriver;
using Xunit;
using System.Linq;
using Raven.Client.Documents.Indexes;
namespace RavenDBTestDriverFullExample
{
public class RavenDBTestDriver : RavenTestDriver
{
static RavenDBTestDriver()
{
// ConfigureServer() must be set before calling GetDocumentStore()
// and can only be set once per test run.
ConfigureServer(new TestServerOptions
{
DataDirectory = "C:\\RavenDBTestDir"
});
}
// This allows us to modify the conventions of the store we get from 'GetDocumentStore'
protected override void PreInitialize(IDocumentStore documentStore)
{
documentStore.Conventions.MaxNumberOfRequestsPerSession = 50;
}
[Fact]
public void MyFirstTest()
{
// GetDocumentStore() evokes the Document Store, which establishes and manages communication
// between your client application and a RavenDB cluster via HTTP requests.
using (var store = GetDocumentStore())
{
store.ExecuteIndex(new TestDocumentByName());
using (var session = store.OpenSession())
{
session.Store(new TestDocument { Name = "Hello world!" });
session.Store(new TestDocument { Name = "Goodbye..." });
session.SaveChanges();
}
// If we want to query documents, sometimes we need to wait for the indexes to catch up
// to prevent using stale indexes.
WaitForIndexing(store);
// Sometimes we want to debug the test itself. This method redirects us to the studio
// so that we can see if the code worked as expected (in this case, created two documents).
WaitForUserToContinueTheTest(store);
// Queries are defined in the session scope.
// If there is no relevant index to quickly answer the query, RavenDB creates an auto-index
// based on the query parameters.
// This query will use the static index defined in lines 63-70 and filter the results by name.
using (var session = store.OpenSession())
{
var query = session.Query<TestDocument, TestDocumentByName>()
.Where(x => x.Name == "hello").ToList();
Assert.Single(query);
}
}
}
}
// AbstractIndexCreationTask allows you to create and manually define a static index.
public class TestDocumentByName : AbstractIndexCreationTask<TestDocument>
{
public TestDocumentByName()
{
Map = docs => from doc in docs select new { doc.Name };
Indexes.Add(x => x.Name, FieldIndexing.Search);
}
}
public class TestDocument
{
public string Name { get; set; }
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on RavenDB.TestDriver:
| Package | Downloads |
|---|---|
|
ECommerce.Data.RavenDbProvider
a resilient abstract data access. StartPoint ECommerce.DataAccess based on Hexagonal architecture gives you the capacity to access any data source with retrying and fallback action |
|
|
MintPlayer.Spark.Testing
Test harness for writing integration tests against MintPlayer.Spark apps: an embedded RavenDB driver (SparkTestDriver), an in-memory Spark host factory (SparkEndpointFactory), an antiforgery-aware HTTP client, JSON fixture seeding, index helpers, and Verify snapshot defaults. |
Showing the top 10 popular GitHub repositories that depend on RavenDB.TestDriver:
| Repository | Stars |
|---|---|
|
JasperFx/wolverine
Supercharged .NET server side development!
|
|
|
Aguafrommars/TheIdServer
OpenID/Connect, OAuth2, WS-Federation and SAML 2.0 server based on Duende IdentityServer and ITFoxtec Identity SAML 2.0 with its admin UI
|
|
|
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
|
|
|
linkdotnet/Blog
A blog (engine) completely written in C# and Blazor. It aims to be a simple use and easy to extend platform. Blogposts are written in Markdown and are rendered to HTML. This gives all the flexibility needed to express yourself but also have an easy way of creating posts in the first place.
|
|
|
TcOpenGroup/TcOpen
Application framework for industrial automation built on top of TwinCAT3 and .NET.
|
|
|
RemyDuijkeren/NodaMoney
NodaMoney provides a library that treats Money as a first class citizen and handles all the ugly bits like currencies and formatting.
|
|
|
stoveproject-archive/stove-archived
Domain Driven Design oriented application framework, meets CRUD needs
|
|
|
linkdotnet/BlogExamples
Contains all of my examples from various blog posts
|
|
|
RemiBou/Toss.Blazor
Experimental project using AspNetCore Blazor
|
|
|
ravendb/samples-yabt
"Yet Another Bug Tracker" solution sample for RavenDB and .NET with Angular UI
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.2.4 | 244 | 6/16/2026 |
| 7.2.3 | 883 | 6/9/2026 |
| 7.2.3-rc-72011 | 95 | 6/2/2026 |
| 7.2.3-rc-72010 | 377 | 5/27/2026 |
| 7.2.2 | 7,809 | 4/28/2026 |
| 7.2.2-rc-72006 | 1,028 | 4/15/2026 |
| 7.2.1 | 6,324 | 3/17/2026 |
| 7.2.1-rc-72004 | 128 | 3/4/2026 |
| 7.1.10 | 85 | 6/16/2026 |
| 7.1.9 | 131 | 6/9/2026 |
| 7.1.8 | 375 | 4/28/2026 |
| 7.1.7 | 500 | 3/17/2026 |
| 6.2.17 | 88 | 6/16/2026 |
| 6.2.16 | 448 | 6/9/2026 |
| 6.2.16-rc-62090 | 91 | 6/2/2026 |
| 6.2.16-rc-62089 | 94 | 5/27/2026 |
| 6.2.15 | 744 | 4/28/2026 |
| 6.2.15-rc-62085 | 100 | 4/15/2026 |
| 6.2.14 | 2,896 | 3/17/2026 |
| 6.2.14-rc-62077 | 101 | 3/4/2026 |