allure-framework / allure2

Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process
https://allurereport.org/
Apache License 2.0
3.97k stars 698 forks source link

Timestamp is not correctly parsed when generated by pytest #1011

Closed acabarbaye closed 2 months ago

acabarbaye commented 4 years ago

Junit reports generated by pytest contain timestamps with nanoseconds: e.g. <testsuites><testsuite errors="0" failures="1" hostname="c79a2fced7c5" name="pytest" skipped="0" tests="66" time="9452.047" timestamp="2019-09-17T05:42:29.342826"> This is not parsed properly by allure and the date is displayed as such in the report:

Allure Report 19/01/1970 4:54:47 - 4:59:56 (5m 08s)

such timestamps comply with RFC3339 (https://tools.ietf.org/html/rfc3339#section-5.6) and therefore, the Junit format (https://llg.cubic.org/docs/junit/).

Expected behavior allure parser should be able to parse any RFC3339 timestamps, no matter the precision and should report them appropriately.

Environment (please complete the following information):

Allure version 2.4.1
Test framework pytest@5.0.1
Generate report using allure CLI
acabarbaye commented 4 years ago

After testing it on Windows with latest version (i.e. 2.12.1), Problem seems to be solved. However, the latest version available on Ubuntu, is 2.4.1