Wednesday, May 30, 2007
Random test data generation.  If you generate random data how good is your test?  If your just testing load this practice is fine but for any thing else you need some semblance of real data.  How can you run a report and validate it if your returned a random assortment of string data?  What would really be the golden standard would be a database of real data such as street addresses names email... A good seed to base your Test data off of.
posted by Aaron Fischer on Wednesday, May 30, 2007 3:25:19 PM (Pacific Standard Time, UTC-08:00)   #    Comments [1]
Wednesday, May 30, 2007 4:33:04 PM (Pacific Standard Time, UTC-08:00)
Aaron,

You can run a report and validate the random assortment of string data by preserving the seed value used to generate the random sequence of data as explained in the magazine article referenced in the blog post. Passing the seed value to the method used to generate the random data will reproduce the same 'random' data over and over again. Also, I don't suggest using only random data, nor do I suggest using only 'real-world' data. A good tester will use a compliment of both types of data when appropriate. The value of random data over 'real' data is that it sometimes exposes unexpected results in poorly written parsing algorithms (which is why developers hate random data). And, coming up with 'real world' implications of randomly generated data is not that hard (if you can think beyond ASCII characters and the United States national conventions). Also, fuzz testing (which relies heavily on random data) is a very good test...unless of course you don't care about security!

Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview