Generate sample data for unit, integration or even pressure test are usually as routine tasks for each engineer or data scientist. We could build those data manually from converting real data from existing database. Or we could choose library that did almost everything for us, the article introduce how to make time-consuming things more simple.
First, download and install Bogus:
Bogus help create seeding within ease and intuition way.
Here are the sample how to generate mock/testing record(s) through Bogus.
Assume that we would like to make some member records for building contact list.
And the result as below:
That’s it. With fewer lines of code our sample data generated!😊
Reference