Testresult import (Jubula junit) uses current date and not test result date

Markus Barbey, modified 5 Years ago.

Testresult import (Jubula junit) uses current date and not test result date

Youngling Post: 1 Join Date: 6/21/18 Recent Posts
Hello,

when importing Jubula results that has been stored in junit format via
  • Execute -> Testresults import
the test run shows up with current date and time in
  • Evaluate -> Testruns
I expected the date and time of the imported test run instead.

Is that a bug or a feature?

Regards,
Markus
thumbnail
Torsten Stolpmann, modified 5 Years ago.

RE: Testresult import (Jubula junit) uses current date and not test result (Answer)

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hello Markus,

This works as intended. Consider this a possible option for an additional feature.

We use the JUnit XML as the lowest common denominator for expected test result content. Sadly enough the JUnit XML format has never been formally specified, so only in some incarnations of this format a run date information is present at all. See [1], [2], [3] for some contradicting examples.

Most notably JUnit-Executions themselves just omit this field (attribute timestamp in the testsuite element) if run from e.g. Maven.

To be consistent over different mutations of this format, we are currently not trying to look into a run date information in result files at all.

In the automated case (import via REST/Jenkins Plugin) this typically poses no problem as long as the import happens in near time.
Additionally we support a time parameter in the REST call to specify a custom run date (See: https://www.klaros-testmanagement.com/files/doc/html/User-Manual.Import-Export.html#User-Manual.Import-Export.TestResultImport).
In the interactive case you are referring to here, there is currently no way to add a custom run date.

There have been other, similar requests in the past so there is a good chance we might look into this topic again in the future.

I hope this helps, please follow up if you have additional comments or questions.

Kind regards,

Torsten

[1] https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
[2] https://github.com/apache/maven-surefire/blob/master/maven-surefire-plugin/src/site/resources/xsd/surefire-test-report.xsd
[3] https://github.com/jenkinsci/xunit-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd