aspose file tools*
The moose likes Testing and the fly likes What Are You Using To Generate Test Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "What Are You Using To Generate Test Data" Watch "What Are You Using To Generate Test Data" New topic
Author

What Are You Using To Generate Test Data

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I'm curious, what tool(s) / methods are you currently using to generate test data, if any.


GenRocket - Experts at Building Test Data
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1763
    
    7

The last client I worked for used a homegrown solution. It used the in-place OR mapping information to import data from a set of XML files into a database schema. Conversely it was also able to extract the data from a schema to a new set of XML files. The data itself was centered mostly around organisations that used the system, their users, roles, rights and configuration. The baseline set of XML files was under version control and shared between the testers and the developers, which was extremely convenient when hunting down bugs and sharing reproduction materials that referenced specific bits of this data (EDIFACT messages for instance). The tool was also capable of template-based generation of configuration documents, which was convenient for testers and first line support. The whole thing integrated into an Ant-based buildsystem using a few customs tasks.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Jelle, when you say "import data from a set of XML files into a database schema" and "extract the data from a schema to a new set of XML files", I wonder where the data came from before there was any data? I'm assuming over time, it just keeps exporting development data, but what if the development data is bad? How would the data be modified if it became corrupt or invalid or stale?
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1763
    
    7

That's a good point I forgot to mention. The baseline data was pretty strictly maintained on a dedicated environment (virtual machine) by a tester. It was entered and/or altered via the system only and then exported as a new XML baseline. No hacking of database records or XML data allowed. I believe the testers entered and verified all the data manually over time, but I'm not completely sure about that.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Jelle Klap wrote:That's a good point I forgot to mention. The baseline data was pretty strictly maintained on a dedicated environment (virtual machine) by a tester. It was entered and/or altered via the system only. No hacking of database records or XML data allowed. I believe the testers entered and verified all the data manually over time, but I'm not completely sure about that.


Thanks for the info.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

A random string generator. This works well for unit testing because I know I just need a String of length x or the like.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Jeanne Boyarsky wrote:A random string generator. This works well for unit testing because I know I just need a String of length x or the like.


What do you do when you need a User with 3 Addresses that belongs to a Department and each User has varying Roles and Positions within the organization?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Gregg Bolinger wrote:
Jeanne Boyarsky wrote:A random string generator. This works well for unit testing because I know I just need a String of length x or the like.


What do you do when you need a User with 3 Addresses that belongs to a Department and each User has varying Roles and Positions within the organization?

I make up the initial data and add a random number to the end. Or pick a role from a list when they are fixed.

This approach only works for unit testing though. For database testing, I don't use random numbers. I've been using a certain test string at the end of values to differentiate it from "pre-loaded" data. Not the best system I know.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What Are You Using To Generate Test Data