Test Data Generator


Do you need some sample or test data for your project? Are you doing work in a spreadsheet or database? Maybe you are a programmer and you need some data to fill a table.

Here’s a site called Mockaroo. Do you need some mock data to test your app? Mockaroo lets you generate up to 1,000 rows of realistic test data in CSV, JSON, SQL (INSERT INTO…), and Excel formats.

Consider the website Online Data Generator. The home page of that site says: “Here you can generate up to 100 combinations of data formats and information and export up to 100,000 records. Build up your test datatable and export your data in CSV, Excel, JSON, or even SQL script to create your table. You can use weights, nullable fields, and more options to generate test data.”

If you choose SQL Insert as the type of export, they include a CREATE TABLE statement in the downloaded file. It doesn’t have any primary keys or anything else defined, however, but it’s a good start.

Below is an SQL script that creates a new table in the current database. The table is called VIPersons and it creates two columns: PersonId and Person.

CREATE TABLE VIPersons (
    PersonId int IDENTITY(1,1) NOT NULL PRIMARY KEY,
	Person [varchar](50)
)

Another way to get data is from organizations that provide sample or test data for free. Microsoft has several datasets available. You could try Maven Analytics over at their Data Playground section.

As a side note, when you install the R programming language, you get included with that a set of datasets that you can use to practice with. That’s very handy.

Another source of data is Kaggle.

Another source is OData by Microsoft.

Leave a Reply