An engine to create test data of any kind!
The application takes a filename as an argument, which should point to a YAML file with the following structure:
- title: A name for the data that you are generating. If you are generating SQL, then this will also be used as the table name in your insert statements.
- output: The format that will be used to generate your test data. Currently only JSON and SQL are supported
- total: The total amount of items that will be generated
- fields: Definitions for the different pieces of data that will be generated
The fields section can have one or more items with the following structure
- name: The name of the data that is being generated
- type: The type of data being generated. Currently only alpha and integer are supported
- min: For alpha fields, this is the minimum length of the string that's generated. For integer fields this is the smallest number that can be generated
- max: For alpha fields, this is the maximum length of the string that's generated. For integer fields this is the largest number that can be generated
There is a sample input file included in the repository. See input.sample.yaml for details.
To run the application with the sample input file, run the following command from the /src
directory:
go run main.go input.sample.JSON.yaml