Random Text Generator
I was recently comparing several databases and CMP implementations. Because I was testing speed I needed a lot of data to load into my test databases. To get fairly representative results the data obviously had to be random. However, I needed exactly the same data for all my tests. These requirements resulted in the RandomText class. This class is an extension of the standard java.util.Random. It provides support for generating fields and rows. It has some other niceties like fixed or variable length or unique fields. See the RandomText API or download the source. If you are testing performance of your database and have a need to generate a lot of random data you can use the RandomText class directly in your application. Because I wanted to provide an example of usage I developed a simple demo to show all RandomText features. However, the original demo evolved into a full fledged standalone utility. The applet version unfortunately does not provide any persistence capability. If you need to create large data files then you must use the Java Web Start version.
The RandomTextGenerator utility requires specification of fields and number of rows. Fields can be fixed or variable length. If you check the Unique check box the field is guaranteed to be unique. The application uses the random seed as a default. However, by checking the Fixed seed check box the seed input field is enabled and application will generate a reproducible data set based on the specified seed.
The RandomTextGenerator applet will
appear below in a Java enabled browser.
Java Web Start Version
If you desire larger data set or generation directly to a file system you can run RandomTextGenerator as a Java Web Start application.
Nothing comes to mind.
RandomText is available free of charge under the terms of the BSDL. If you want to experiment and enhance the current application you can download the source code here. However, if you do so, please consider sending me your enhancements for re-posting.
If you have any suggestions or bug report send them to: email@example.com