Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What Are You Using To Generate Test Data

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm curious, what tool(s) / methods are you currently using to generate test data, if any.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A random string generator. This works well for unit testing because I know I just need a String of length x or the like.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic