jeudi 24 septembre 2015

Creating a large XML file for test data (quickly)

I have been looking into testing my program with a large Xml file to see how it performs with large datasets, however I do not want to go into the effort of generating a file with ~1000 entries. I would be here all week!

Is there a way to do it quickly to a certain structure? My program reads Xml Documents in this layout:

           @"<root> 
                <Person>
                    <Name>Joe Doe</Name>
                    <StartDate>2007-01-01</StartDate>
                    <EndDate>2009-01-01</EndDate>
                    <Location>London</Location>
                </Person>                    
                <Person>
                    <Name>John Smith</Name>
                    <StartDate>2012-06-15</StartDate>
                    <EndDate>2014-12-31</EndDate>
                    <Location>Cardiff</Location>
                </Person>
                ...

etc. I've found some online generators like Mockaroo but they are rigid in the structure they generate. I also looked into libraries such as autoFixture but I dont feel like that is what I am looking for in this case.

If anyone can provide me with some advice on how to accomplish this, I would really appreciate some help! Thanks!

Aucun commentaire:

Enregistrer un commentaire