Page 1 of 1

XML validation

Posted: Wed Jul 23, 2014 3:03 pm
by rholdberh
Hi,
i need some help. My application is generating XML after some wizard. And i need to verify that all values were correctly written to this XML. As i understand i can do this in 2 ways:
1. While test is running create my own XML and then just compare "my" and "application" XMLs
2. Just parse XML and verify that all strings are correct

IMHO: First option is quite "dirty" solution, i dont think that it is a good idea to create 1 XML during test and then compare it with one that was created by application. Second option will not verify all the XML, but only nessesary values aand this is not also very good from the test side. So maybe you can give me some positive arguments for this or maybe better solution.
Thanks

Re: XML validation

Posted: Mon Jul 28, 2014 2:15 pm
by Support Team
Hi rholdberh,

I think I would also prefer the second solution. You can use, for example the XmlReaderof the .NET Framework in order to check if the correct values were written into the xml file.

Regards,
Bernhard