dimanche 31 mars 2019

How to pass request for random xml generation?

I want to provide a method (let's call it --> generateXml(?);)which generates the xml fields of a xsd. There should be the option to generate a random value for all xml fields. The is another method (let's call it --> buildXml();). This method includes a generation of xml but it is hardcoded and I want to change this by providing generateXml(?);.

So generateXml(?); generates a xml (e.g. with JAXB) and the content of the xml fields can be randomized if it is desired.

What I am searching for is a proper data structure (the ? in the method above) which should be passed to the generateXml method.

So my approach would be to pass every xml field and another parameter for every xml field like a boolean randomize; to inform that this field should have a random content.

But how? Should I pass a file which contains every field and the random parameter?

What is recommeded here?




Aucun commentaire:

Enregistrer un commentaire