generating test xml

Soldato
Joined
18 Oct 2002
Posts
5,600
Location
Surrey
Hi all,

I've been strugling withb this for at least an hour now so I thought I'd ask the collective OcUK mind for some help. I have some XSD files (schemas) that detail the input types for a system that I'm working an. They are full of xsd:choices, ennumerations and other such structures. In order to run a test on the system, I'd like to be able to generate a set of xmls files that use all of the possible options in the xsds. I know that there will be a lot of xml files and that it will take days possibly weeks to run the test but I don't really care :D

Does anyone nkow of a tool that will generate a test data set according to XMl Schemas ?

Cheers me dears, Paul
 
happytechie said:
Hi all,

I've been strugling withb this for at least an hour now so I thought I'd ask the collective OcUK mind for some help. I have some XSD files (schemas) that detail the input types for a system that I'm working an. They are full of xsd:choices, ennumerations and other such structures. In order to run a test on the system, I'd like to be able to generate a set of xmls files that use all of the possible options in the xsds. I know that there will be a lot of xml files and that it will take days possibly weeks to run the test but I don't really care :D

Does anyone nkow of a tool that will generate a test data set according to XMl Schemas ?

Cheers me dears, Paul

You could use a tool like JAXB to generate some Java classes that represent the XML types, and create constructors/factory methods that will use reflection to iterate through the fields and populate them with random data dependant on type, before marshalling them into XML?

It sounds more complicated than it is, promise!
 
I 'could' and there are a couple of tools out there in the open source world that do bits of the task (badly).

I was kind of hoping that someone might have found a tool that did that and actually worked.

I've had the same responce form a few people, 'oh that would be really useful, let us know if you fiond one that works. and 'yeah we wrote one of those for project X but I can't send you the code'.

I really hope I don't have to write my own as I really haven't got time.

Paul
 
Back
Top Bottom