KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Generating Test Data Easily and Quickly
PRODUCT: 4D | VERSION: 13.5 | PLATFORM: Mac & Win
Published On: May 23, 2014

Testing is an important process to assure quality to users. When testing a 4D database, a large number of records may be needed. Generating a large number of legible records can be done easily and fairly quickly using resources provided on the web.

Example websites that can be used for this Tech Tip:



To generate test data and use it with a 4D application, first go to one of the listed pages or find a similar service provider, which can allow specific and legible data to be generated.

Next begin creating the fields and selecting the type of data that will occupy the fields.

Database Test Data example:


Then generate the data in a compatible format such as a Text file with delimiters or an XML file.

NOTE:Make sure that the formating for the files are correct. Incorrect formating can result in unexpected results, such as 4D requiring XMLs to have a prolog, without a proper prolog 4D may crash during it's attempt to read the file. Database Test Data does not provide a prolog for in the XML format, adding at the start will allow the file to be read correctly.

With the data file created open up 4D and import the data using 4D's import feature and selecting the file.


In the import window an existing table can be selected and appened or a brand new table can be created matching the number of fields and field types from the data by selecting the Create Table box.


4D uses Tab LineFeed delimiters by default when reading text files, these can be changed by using the Delimiters Tab.


Using avaliable resources can allow a large and fairly meaningful data to be generated in a short time for testing or other purposes.

Below shows that 22000 test records were generated in a matter of minutes.