You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Sami Leino <sa...@netorek.fi> on 2004/02/20 15:04:37 UTC

Populators and performance testing

This subject is not directly targeted at Jetspeed development. However, it
concerns performance testing in large web applications, so I thought the
conversation could benefit many Jetspeed developers as well.

Populating databases for performance testing has usually been done by
importing large portions of SQL into the database. However, the
O/R-mapping frameworks have now become quite mature, and importing SQL
isn't the most adequate solution for many applications anymore. We can
easily build very rich object models with these frameworks, and as a
result, the structure of the actual relational model might be much more
complex than the structure of our object model itself. Therefore, it might
now be more tedious to generate the SQL than it would be to generate the
object graph.

Because of this, it would sometimes be more natural to generate
application's testdata as an object graph, and let the O/R-framework to
persist it to a datastore. Doing this programmatically is easy, but you
have to create a customized populator for all your projects. If you have a
common persistence layer for all your projects, it would be nice to have a
common populator as well. Only the object model and data should differ,
shouldn't it?

Now I'd like to ask, if anyone has ever found such a generic populator
framework for Java. The framework should:

1) Handle relationships (1-n, n-m) between domain model data beans
2) Handle datatype conversions for bean properties, and possibly support
both constructor injection (default) as well as setter injection
3) Support various functions for generating/choosing property values, such
as:

   * Pick 0-n entries from a specified enumeration
   * Pick 0-n entries from another domain model object list (for example:
each UserGroup could pick 0-10 User objects)
   * An entry from a custom sequence generator
   * A random number

4) Have an XML configuration format with a clean structure and small overhead
5) Have a good introductory document or example

I've seen some frameworks addressing some of these issues, but many of
them have either had a horrible XML format or no documentation at all.

If anyone has any experience on this subject I'd like to hear about it.
And if someone thinks that this whole idea of populating systems like this
is stupid, I'd like you to say it as well.

Sami

-- 

Sami Leino
Software Developer
Netorek Oy

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org