Skip to main content
net10.0

A configurable performance test data seeder for Umbraco CMS v17 for performance and load testing. Automatically seeds languages, dictionary items, data types, document types, media, content, and users.

Published
May 5, 2026
5mo ago
Total Downloads
444
444

Install

dotnet add package Umbraco.Cms.TestDataSeeder --version 17.0.0-beta.2
ProductVersions
.NET
net10.0

README

Umbraco.Cms.TestDataSeeder

NuGet License: MIT

A configurable performance / load-testing data seeder for Umbraco CMS. Automatically creates languages, dictionary items, data types, document types (including BlockGrid and BlockList compositions), media, content, users, and members on application startup.

⚠️ Not for production use. This package creates large volumes of content, media, users and members. It is intended for performance and load testing only. Install it in dedicated test environments.

Compatibility

The package major aligns with the supported Umbraco CMS major, matching the rest of the Umbraco.Cms.* package family.

Package version Umbraco .NET
17.x Umbraco 17 .NET 10

Support for Umbraco 13/14 is planned on a separate release train (13.x).

Installation

dotnet add package Umbraco.Cms.TestDataSeeder --prerelease

The --prerelease flag is required while 17.0.0 is in beta. Once stable ships, pin to --version 17.*.

The package auto-registers via an IComposer, so no startup wiring is required in the host project. By default the seeder is disabled; enable it explicitly in appsettings.json (see below).

Configuration

Configuration lives under the Umbraco.Cms.TestDataSeeder root in appsettings.json, split into two sub-sections:

  • Umbraco.Cms.TestDataSeeder:Options β€” runtime behaviour (enable/disable, preset, batching, publishing mode, domain suffix, etc.)
  • Umbraco.Cms.TestDataSeeder:Configuration β€” target counts per data type (languages, content, media, document types, …)

Minimal enable

{
  "Umbraco.Cms.TestDataSeeder": {
    "Options": {
      "Enabled": true,
      "Preset": "Medium"
    }
  }
}

With Preset set, the counts under Umbraco.Cms.TestDataSeeder:Configuration are overridden by the preset values. Use "Custom" (default) to drive counts from the Configuration section instead.

Presets

Preset Approximate total items Use case
Small ~180 Quick smoke tests
Medium ~1,400 Moderate local testing
Large ~16,000 Performance testing
Massive ~74,000 Stress testing
Custom driven by SeederConfiguration Full manual control

Runtime options (Umbraco.Cms.TestDataSeeder:Options)

Key Default Purpose
Enabled false Master switch. Must be set to true for seeding to run.
Preset Custom Small / Medium / Large / Massive / Custom.
StopOnError false Abort the whole run on the first seeder failure.
DryRun false Log what would be created without persisting.
FakerSeed null Fixed seed for reproducible data. null uses the current time.
BatchSize 50 Items per database batch.
ParallelDegree 4 Max parallelism for CPU-bound work (e.g. image generation).
PublishMode FirstSection None (draft), All, or FirstSection (publish first root only).
PublishBatchSize 50 Content items published per batch. 0 = publish immediately.
DomainSuffix "localhost" Host used for generated content domains; include port for local dev.
SkipContentDomains false Skip creating content domains entirely.
RebuildCacheAfterSeeding true Rebuild the published content cache after the run.
ProgressIntervalPercent 10 Log progress every N percent. 0 disables progress logs.
EnabledSeeders.* all true Per-seeder toggles (Languages, Dictionary, DataTypes, DocumentTypes, Media, Content, Users, Members, ContactForm).
Prefixes.* Test_ / testElement / … Naming prefixes for generated entities.
CustomCultures null Override the built-in 30-culture pool.

Custom counts (Umbraco.Cms.TestDataSeeder:Configuration)

When Preset = Custom, the Configuration sub-section controls how many of each entity to create.

Top-level sections: Languages, Dictionary, Users, DataTypes, DocumentTypes (with ElementTypes / VariantDocTypes / InvariantDocTypes complexity breakdown plus BlockList / BlockGrid / NestingDepth / MaxBlocksPerEditor), Media (per-type counts for PDF / PNG / JPG / Video), Content (counts, content-complexity distribution, tree shape), and Members (counts, default password, Standard/Premium/VIP distribution).

Full example (appsettings.Test.json)

Combining both sub-sections in one file:

{
  "Umbraco.Cms.TestDataSeeder": {
    "Options": {
      "Enabled": true,
      "Preset": "Custom",
      "FakerSeed": 42,
      "DomainSuffix": "localhost:44340",
      "PublishMode": "FirstSection",
      "DryRun": false
    },
    "Configuration": {
      "Languages":   { "Count": 10 },
      "Users":       { "Count": 10 },
      "Members":     { "Count": 20, "StandardPercent": 50, "PremiumPercent": 30, "VIPPercent": 20 },
      "Content":     { "TotalTarget": 500 },
      "Media":       { "JPG": { "Count": 100, "FolderCount": 5 } }
    }
  }
}

How seeding runs

TestDataSeederComposer registers all services and an async notification handler for UmbracoApplicationStartedNotification. When the hosting app starts and Options.Enabled is true, SeederOrchestrator runs every registered ISeeder in execution order. Configuration is validated first; if validation fails and StopOnError is true the run is aborted.

Progress is logged via the standard ILogger pipeline. A summary table is emitted at the end of the run.

Test endpoints

For load-test scenarios the package also exposes HTTP endpoints under the umbraco/api/ prefix.

⚠️ Security model. Every endpoint below is anonymous β€” intentionally so, so load-test runners (k6, JMeter, …) can discover targets and exercise contact-form / member-auth flows without managing credentials. This is safe only in dedicated test environments. Do not expose a host running this package to the public internet. See SECURITY.md.

Route Auth Purpose
GET /umbraco/api/seederstatus/status Anonymous Seeding status, current seeder, elapsed, plus the active Preset and FakerSeed.
GET /umbraco/api/seederstatus/inventory Anonymous Catalog of seeded root-section URLs, sample content URLs (each annotated with complexity and docType so scripts can pick e.g. "complex Detail pages only"), media URLs, member username pattern, and prefixes. Use this for dynamic target discovery in k6.
POST /umbraco/api/contactform/submit Anonymous (JSON) Submit a seeded contact-form entry.
POST /umbraco/api/contactform/form-submit Anonymous + anti-forgery Form-encoded submit (requires @Html.AntiForgeryToken()).
GET /umbraco/api/contactform/stats Anonymous Contact-form submission stats.
POST /umbraco/api/memberlogin/login Anonymous + anti-forgery Log a seeded member in (form POST).
POST /umbraco/api/memberlogin/logout Anonymous + anti-forgery Log out (form POST).
POST /umbraco/api/memberauth/login Anonymous (JSON) Member auth login.
POST /umbraco/api/memberauth/logout Anonymous (JSON) Member auth logout.
GET /umbraco/api/memberauth/me Anonymous (reports state) Returns current member info; reports success=false if no authenticated cookie/session is present.

Resetting between runs

IsAlreadySeeded() checks make the seeder idempotent β€” re-running with the same configuration is a no-op. To get a clean slate (e.g. to switch presets or change FakerSeed), drop the Umbraco database and let unattended install rebuild it:

rm path/to/Umbraco.sqlite.db
dotnet run

For SQL Server hosts, drop and recreate the database. CI pipelines should provision a fresh database per run rather than mutating a shared one.

Member password handling

The seeded member password is intentionally not returned by any HTTP endpoint β€” an unauthenticated status endpoint exposing shared credentials is an unnecessary footgun, even in test environments. Load-test scripts should read the password from an out-of-band source:

# in CI / load-test env
export SEEDER_MEMBER_PASSWORD="Test1234!"

Then in the script:

// k6 example
const password = __ENV.SEEDER_MEMBER_PASSWORD;

Keep the value in sync with Umbraco.Cms.TestDataSeeder:Configuration:Members:DefaultPassword in the host's appsettings.json.

Building from source

dotnet restore
dotnet build
dotnet pack -c Release

Targets .NET 10 and Umbraco [17.0.0, 18.0.0).

Contributing

Issues and pull requests are welcome. Please open an issue first for larger changes so we can discuss the direction.

License

MIT β€” see LICENSE.md.

Changes from Previous Version

No structural changes between v17.0.0-beta.1 and v17.0.0-beta.2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.