views:

253

answers:

4

Is there any tool to generate test data based on specific requirements?

e.g. Size, file type

A: 

Well, what is the larger context? There are usually specialized tools in specific areas. I mainly know about MS technology, where "data dude" can do database test data generation, and (unrelated) PEX can use analysis to find data that gets into your uncommon code branches... but for much more specific scenarios, you might need to write your own tool.

Marc Gravell
A: 

Your question is quite open ended ...

You can find some data useful for testing in many areas, usually related to natural languages, by searching for the word "corpus".

If want to generate random data, go and hack a Perl script... but :

  • beware of computer generated randomness that can hurt you (http://en.wikipedia.org/wiki/Random_number_generator).
  • Test data are really useful when you know what the result of yor computation is supposed to be, otherwise you don't know if your test did succeed.

I have seen many people generating tons of data to test the performance of their code while forgetting to check the result was correct.

If you are lucky enough to have the possibility to do a round trip, like for example with compression / decompression, the random data generation can provide useful and catch corner cases you would not have thought of

siukurnin
A: 

This is a very a open ended question. Although surely test data wants to test specific test cases, therefore as Marc says, writing your own tool might be a better way to go, I doubt a general tool will every give you what you need. However if you explain your scenario, it might be easier to help.

Jamie