Skip to content

Data Provider

Michael Altmann edited this page Sep 20, 2016 · 8 revisions

A data provider defines the way how to load and define test data. If test data comes from a csv/json/xml file or is declared directly in C# code depends on the data provider.

Existing Data Providers

Until now the CSV data provider is the only one available via NuGet. For more info see CSV Data Provider.

Custom Data Providers

Implementing a custom data provider is easy. For more info see Custom Data Provider.

Setting Global Data Provider

You can set a global data provider by calling method WithDataProvider(IDataProvider dataProvider) which is used globally for all entities. CherrySeed does not support entity specific data providers.

var config = new CherrySeedConfiguration(cfg =>
{
    ...
    cfg.WithDataProvider(dataProvider);
    ...
});

Clone this wiki locally