qspin / qtaste

[NEW RELEASE VERSION 3.0.0] The QTaste is an open-source functional and non-functional test environment offering services to developers and testers. It has been implemented following a data driven testing philosophy.
http://www.qtaste.org
GNU Lesser General Public License v3.0
6 stars 11 forks source link

Invalid xml report file (log-results-*.xml) #215

Open pguermo opened 7 years ago

pguermo commented 7 years ago

The files log-results-*.xml are not valid as they contains more than one "root" tag. All the tags should be under a tag.

Moreover the tag <?xml version="1.0"?> should be present as first line of the file.

dergo commented 7 years ago

These files are indeed NOT XML files, they are XML extracts included in the log-*.xml files, which are valid.

These is necessary to avoid rewritting the entire file every time we need to add a result, this way we can just append to log-results-*.xml file.

These files could be renamed to another extension but I'm not sure it's worth it.

pguermo commented 7 years ago

Do you still succeed to browse the log-.xml file with a recent browser ? It seems the inclusion mechanism DOCTYPE ENTITY SYSTEM is not supported anymore for safety reasons. This is why we want to use the log-result.xml file. More over, it whould be nice to be allowed through the configuration to be allowed to specify the location of xsl file.

dergo commented 7 years ago

It indeed doesn't work anymore in Internet browsers for security reason, but the XML is valid and you can use an XML tool to read it and convert it to another XML file which is not using this mechanism, if you really want to use an Internet browser and keep an XML result. With this XML tool you can also specify an XSL file in the result file.

pguermo commented 7 years ago

Adding a top level tag "results" in the file log-results-*.xml could only add value: no regression if the files is included and used with a XML tool but it would be seen as a valid XML by a browser. It's always possible to use tools "around", but it reduces the usability. Let's make QTaste user friendly !

dergo commented 7 years ago

As explained in my first comment, the current structure is necessary to avoid rewritting the entire file every time we need to add a result, which would have to be done if a top level tag was added. Changing this would have a noticeable performance impact.

dergo commented 7 years ago

Example usage of simple tool to process the entity inclusion: xmllint --noent log-2017.01.09-12h12m21s.xml -o log-complete-2017.01.09-12h12m21s.xml