A common obstacle frequently faced by the testing team is the A couple of months ago I was introduced to the Data Generator
challenge of having to check several testing scenarios which re- tool, which according to the website www.generatedata.com is
quire very large amounts of data that could take months to be „a free, open-source script written in JavaScript, PHP and MySQL
obtained in a real production environment. Also, depending on that lets you quickly generate large volumes of custom data in a
the domain of the application, it may just not be possible to have variety of formats for use in testing software, populating databa-
the data made available from production environment due to se- ses, and scoring with girls“. I still haven‘t discovered how the tool
curity or privacy issues. Therefore, quality assurance teams need may help you „score with girls“, but it sure is a great tool to assist
to find other ways to simulate these scenarios as closely as pos- software testing in populating databases.
sible to real environments, whilst at the same time they usually
face strict time constraints, which makes their work even harder. In this article I will describe the main features of this application,
pointing out ways to better use these features based on our pre-
Test engineers have at their disposal some solutions to deal with vious experience using Data Generator in our projects.
this matter. However, they are not always easy to use or are not
fast enough. A commonly used approach is to create SQL scripts
First Look and Installation
manually using a text editor, which is a tedious task that consu- The first great thing about the Data Generator tool is that you
mes a lot of time. Another possibility is to use specific tools to aid can try it out without having to install it. After accessing the
in this task, allowing the user to quickly and easily generate large application‘s website www.generatedata.com and clicking on
amounts of data. However, it is not easy to find a suitable open- the Generator tab, you will be presented with that same web GUI
source tool that is flexible enough to adapt to any type of scenario that you will have if you later on decide to install it locally on your
and all data types. machine. The only constraint is that using this “demonstration”
1. Download the zip-file at the top and unzip the contents lo-
cally on your computer. Explaining its main features
2. In the zip-file, you‘ll find a file in the /install folder named First, I will describe how we can use the pre-loaded user databa-
db_install.sql. This contains all the SQL to create the MySQL
se to generate data. Almost all applications have a user manage-
tables and raw data used by the Data Generator (names, ci-
ment feature that uses data like name, phone, e-mail, address,
ties, provinces, states, countries, etc). You will need to execu-
te these statements on your database through any database etc. It is also common that at some point during the project life
access tool, such as phpMyAdmin. cycle we need to use a larger amount of user data, in order to as-
sess how the system behaves in different test scenarios that may
3. Edit the global/library.php file. At the top, you‘ll see a sec-
focus on features like response time, data integrity, general user
tion where you need to enter your MySQL database settings.
interface, and many others.
Note: if you choose to change the database prefix, make sure
you rename the tables after running the SQL in #2!
On the Data Generator main screen you will be able to define on
4. Upload all files to your web server. each row a data type for each column of the table that you want
5. Upload it to your web browser and get to work. to populate. For each row, the user can define a column title and
its data type along with its specific settings. Different types of
After this small procedure, you can start using Data Generator. pre-loaded data types will be available like: name, phone/fax, e-
As we will describe in the next section, it comes with a pre-loaded mail, city, and others. These data types allow us to solve different
database that might help you in several test scenarios. issues, by attending various test scenarios.