mirror of
https://github.com/bitwarden/server.git
synced 2025-05-14 16:12:18 -05:00

Adds a database seeder which can be used standalone using a CLI for seeding your local development environment, or used in unit tests to seed complex scenarios. --------- Co-authored-by: Robert Y <rkac@bitwarden.com>
19 lines
700 B
Markdown
19 lines
700 B
Markdown
# Bitwarden Database Seeder
|
|
|
|
A class library for generating and inserting test data.
|
|
|
|
## Project Structure
|
|
|
|
The project is organized into these main components:
|
|
|
|
### Factories
|
|
|
|
Factories are helper classes for creating domain entities and populating them with realistic data. This assist in
|
|
decreasing the amount of boilerplate code needed to create test data in recipes.
|
|
|
|
### Recipes
|
|
|
|
Recipes are pre-defined data sets which can be run to generate and load data into the database. They often allow a allow
|
|
for a few arguments to customize the data slightly. Recipes should be kept simple and focused on a single task. Default
|
|
to creating more recipes rather than adding complexity to existing ones.
|