Generate Data Files Ready for Import
"Custom" Type: Provide Your Own Data
Import data into MySQL, Microsoft SQL Server, Oracle or IBM DB2
MockupData is a Windows tool that generates large quantities of realistic looking data. Such data is required for software or database testing. Often, such data is also needed for demonstrating the capabilities of a new software system.
Large quantities of data allow your test runs to be much more realistic. Functional testing will definitely help you catch more bugs, while large data volumes enable you to run stress and performance tests.
Realistic looking data makes more sense to anyone inspecting your application; be it your own testing team or a customer representative trying to make head or tails of the new features your team just implemented.
Sometimes both types of data can be achieved by copying a part of the production data. However, live data is often not available. For example, maybe you are building a brand new system; or privacy legislations prevent you from easily using existing data.
Or, maybe it's simply too much work. Somebody has to write and debug all the scripts and all the data transformations you need in order to migrate a part of the existing data into your test database.
Not to mention, the idea of trying to populate a test database by hand can be overwhelming. Remember all the times you were flabbergasted by developers doing all the testing with the names resembling 'Aaa' and all the numbers being '1234'?
Thus, this tool is available to help populate your test database quickly with any quantity of data you require.
And, with realistic looking data!
I can't tell you how many projects I was involved in over the last two decades that would benefit greatly from such a simple tool...
Simply download the latest version of MockupData from the website, then install and run it. MockupData has a very small footprint, so it only takes a minute or two to be fully operational.
How does MockupData work?
Well, here are the basics:
1. You specify how the data in your tables should look
2. You preview the generated data to make sure everything is as expected
3. You generate data files that are ready to be imported into your database
It's that simple, really.
The only work YOU have to do is define the columns for each of your data tables and define rules concerning how each column's data should look. For example, the 'ID' column would be a 4-digit random number between 1.000 and 5.000. Or, the 'Name' column should contain your first name followed by your last name (separated by blank space).
In this way, you can populate your whole 20-table test database with thousands (or more) of real-looking records all before lunch!
Generated data is stored in .csv files, one file per data table. This way you can import the data with a single trivial command (per table) in any modern database you have.
Let's take a look at how you will specify the data you want to generate.
Here is the main MockupData screen:
The main part of the screen shows all the columns in the table you are working on at the moment. You switch the table by clicking on its tab.
Each column is represented by a box that contains:
- One or more rules specifying how the generated data should look
- Sample of the data that would be generated for this column by using those rules
For each column you can specify whether all the generated values for that column should be unique, via the "Unique" checkbox at the top.
Also, you can define that this column should be populated with random values from another table's column. By clicking on the "Dependency" checkbox, MockupData will provide you with the "Set Foreign Key" button. Click it when you are ready to choose the column with original data values.
By the way, simply drag the column by its heading in order to reorder the columns.
To add a new rule, click on a "+" button, and then specify what kind of rule you want. This is done at the bottom part of the screen. Basically, you choose the data type (text, number, date, etc) and then the subtype. For example, a text rule can generate a random name or a random street addres
Here, you can also specify the parameters as a rule. For example, you can specify the incremental number (for rule type you choose "Number", for subtype you choose "Sequence"), and also that it should start with 1000 and be incremented by 5. So you get: 1000, 1005, 1010, etc.
Sometimes it's nice to be able to merge or split tables. When you click "Merge with" you will be asked to choose which table to merge the current table. And, if you click "Split", the currently selected column and all columns to the right will be moved to a new table. Of course if you make a mistake, you can undo it.
By clicking the "Preview data" button located at the top-right on your screen, you get the following screen:
It shows 30 records of generated data for each of your tables. Of course, when you generate .csv files you can set a much bigger number of records.
Here, you can generate data again if you are still not sure this is you want.
You can generate data files from here by clicking the "Generate CSV…" button (which will open generate dialog), or return back to specifying your data.
To generate the data, you click the "Generate CSV" button (on either the main MockupData screen or on the "Preview data" screen) and set the needed parameters:
The first thing to notice is how many records you want for each table. You can set the same number (let's say 1.000) for each table, and then set a different number (let's say 10.000) for several of your tables that should realistically contain much more data records.
You choose the folder where you want the .csv files to be created and the prefix for the file name. By default, if your project's name is "Employee DB" and your first table's name is "Performance" then the table’s generated data will be "Emloyee_DB_Performance.csv". It will be located in your “My Documents” folder. This is probably not exactly what you want, so at least create a separate folder for generated files.
Under "Options" you can change the field, record, and string delimiters. If you don't know what I'm talking about, don't change these options unless your import fails. THEN, open your database's reference manual and find the exact delimiters you need to specify.To read how to import CSV files into MySQL, Microsoft SQL Server, Oracle or IBM DB2, check the short version here.
To rename a table or a column, click on the pencil icon or double click on its name.
You can reorder rules, columns and tables by simply dragging and dropping.
Define content for a specific column by adding one or more rules that will generate exactly what you need. To add a rule simply click on the "+" icon within a column.
You define how your data should look by choosing the appropriate rule type.
You can provide your own data by choosing "Custom..." type and choosing your own data file. This should be a simple text file with each value in a separate row.
E-mail addresses can be generated from as little or as much data as you need:
E-mail rule will try to find name, last name and company data in other columns within the same table. This rule will use what it can find, and add (randomly) what is needed to make the e-mail address valid.
For example when you have names in one column and company name in another, e-mail rule will generate addresses that look like "name@company.com". If company column can have empty (null) values, for such records e-mail rule will simply use common domains such as aol.com, gmail.com.
Sometimes your table will contain multiple first names, last names or companies. When such is the case, then you can manually set which columns to use in generated e-mail address.
Or if you want all e-mail addresses to use same domain (e.g. your client's company), you can set it by hand in "Custom domain" field.