New library for verifying XML contents

1,276 views
Skip to first unread message

Pekka Klärck

unread,
Aug 16, 2012, 4:45:12 AM8/16/12
to robotframework-users
Hi all,

We have created a new test library for verifying XML contents and are
going to include it into RF 2.7.4. It is possible that in the future
it will be extended to support also modifying and creating XML. The
name of the new library is, unsurprisingly, `XML`. The library is
already ready for testing and its documentation is here:
http://robotframework.googlecode.com/hg/doc/libraries/XML.html

The library also can be used with earlier Robot Framework 2.7 versions
by downloading the library and placing it into a location that is in
PYTHONPATH. The library is located here:
http://robotframework.googlecode.com/hg/src/robot/libraries/XML.py

All kind of comments regarding the library are welcome here in the
mailing list or in the issue tracker:
http://code.google.com/p/robotframework/issues/detail?id=1196

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

CLAYTON

unread,
Oct 25, 2012, 12:57:27 PM10/25/12
to robotframe...@googlegroups.com
Hiya,

The Java API of ExamXML would be very useful to "keyword-ise" for automated comparison of xml files...
See : http://www.a7soft.com/jexamxml.html
This tool allows complex comparison of xml files including:
- DateTime normalisation
- Tolerance applied to numeric values
- Ignoring specific elements/attributes in the comparison
The xml comparison algorithm is based on the xml structure (rather than line by line comparison)

Regards.

CLAYTON

unread,
Oct 31, 2012, 11:38:58 AM10/31/12
to robotframe...@googlegroups.com
Hiya.

The new library looks good but often what automation people do is prepare a "golden" xml file.
This file contains all expected data (elements, attributes, structure, values etc.)
All they then need is compare this expected xml file to the actual xml file and generate a diff file
The XML library as it stands wouldn't suit that case - especially if you have say 1000+ nodes to validate!

Cheers,




On Thursday, August 16, 2012 9:45:12 AM UTC+1, Pekka Klärck wrote:

Pekka Klärck

unread,
Oct 31, 2012, 5:03:56 PM10/31/12
to clayto...@yahoo.co.uk, robotframe...@googlegroups.com
2012/10/31 CLAYTON <clayto...@yahoo.co.uk>:
>
> The new library looks good but often what automation people do is prepare a
> "golden" xml file.
> This file contains all expected data (elements, attributes, structure,
> values etc.)
> All they then need is compare this expected xml file to the actual xml file
> and generate a diff file
> The XML library as it stands wouldn't suit that case - especially if you
> have say 1000+ nodes to validate!

What is that diff file used for? If the idea is to verify is that two
XML documents are same, keywords `Elements Should Be Equal` and
`Elements Should Match` ought to work just fine.

New functionality can obviously still be added into the library in the
future. It did, for example, got keywords for modifying and saving XML
in RF 2.7.5.
Reply all
Reply to author
Forward
0 new messages