matthallamew / DBSeedr

Seed a database table(s) with random data for UI testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DBSeedr

Seed a database table(s) with random data for UI testing

Given a database table name, get the metadata (example: data type, maximum length, etc) for all the fields in the table. With this information, generate random data for insertion into the table. The maximum length derived from the metadata is used to determine how long the generated data should be so each field can be as full as possible.

Currently, this is program is tightly coupled to Microsoft SQL Server.

It is easiest to run this program from an IDE or the CLI as you will need to manually update the variable tableToFillWithRandomData with the name of the table that you want to generate data into.

If the table you want to fill has a non-nullable Foreign Key, you will need to manually add that to the staticFields map to ensure the insert query succeeds.

The staticFields map may also contain any database field name and value pairs to enable you to fill certain fields with non-random data (example: recordType).

About

Seed a database table(s) with random data for UI testing


Languages

Language:Go 100.0%