Using Mockaroo and Entity framework to Seed Sample Data for .NET Applications
dev.to·3h·
Discuss: DEV
🧪Test Automation
Preview
Report Post

Testing your applications thoroughly requires diverse sample data that’s often time-consuming to create manually. Mockaroo simplifies this process by generating realistic test data quickly, and today we’ll explore how to use it.

The only thing you’ll need for this tutorial is Visual Studio community edition. You can download it here

Create a Dataset in Mockaroo

Navigate to the Mockaroo Website, and define the Dataset fields, I have defined mine like so;

Since we’re going to seed the data through EF Core, we’ll select the output format as JSON.

Click on GENERATE DATA and the output file should be downloaded.

Create a Web API project

Open up Visual Studio and click **Create a new Project…

Similar Posts

Loading similar posts...