Add write xml file support fot tests