Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure displays date and time as unknown in summary overview page, as it should have been taken from <testsuite> tag of junit xml output #621

Closed
1 of 3 tasks
mailtosoma opened this issue Oct 6, 2017 · 9 comments
Assignees
Labels
theme:readers type:improvement Change that improves some user experience but can't be considered as a new feature

Comments

@mailtosoma
Copy link

mailtosoma commented Oct 6, 2017

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Allure report is displaying date and time as unknown when we generate allure by providing junit xml as input. we have testsuite tag like below in junit xml output, we could have used that to display date and time

<testsuite errors="14" failures="10" hostname="cbgtalosbld02" id="0" name="LocalSuiteIDOL" package="com.zantaz.junit.testsuites" tests="1251" time="391.212" timestamp="2017-10-05T10:36:22">

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Generate JUNIT XML Output/Report by executing junit test cases and provide that as input to allure2

What is the expected behavior?

It should display date and time correctly in overview page. If there are multiple test suites like above ,we could have cumulated the complete time that accordingly

<testsuite errors="14" failures="10" hostname="cbgtalosbld02" id="0" name="LocalSuiteIDOL" package="com.zantaz.junit.testsuites" tests="1251" time="391.212" timestamp="2017-10-05T10:36:22">

<testsuite errors="13" failures="11" hostname="cbgtalosbld02" id="1" name="LocalSuiteLucene" package="com.zantaz.junit.testsuites" tests="1381" time="375.624" timestamp="2017-10-05T10:43:42">

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Allure version 2.2.0
Test framework [email protected]
Allure adaptor [email protected]
Generate report using [email protected]

Other information

@baev baev self-assigned this Oct 8, 2017
@baev baev added work:in progress type:improvement Change that improves some user experience but can't be considered as a new feature theme:readers and removed work:in progress labels Oct 8, 2017
@baev baev closed this as completed in a36769a Oct 8, 2017
@baev baev removed the work:review label Oct 8, 2017
@karinimagalhaes
Copy link

I have the same problem. Has anyone managed to solve it?

@linxianying
Copy link

Same here

@shubra-shetty
Copy link

I am facing the same issue. Date not displayed.

@haridasnykiel
Copy link

I am also getting this issue when using xunit xml report to generate the allure report

@gvenkatachal
Copy link

I am also seeing the same issue. Any solutions?

@sbakshi06
Copy link

Is there a fix for this?
I am getting an issue where time is not displayed as per in junit report but it displays a random date 19/01/1970

@aabinashinfogix
Copy link

@sbakshi06 I am also getting the date as of 19/01/1970. Are there any solutions?

@KrutikaD05
Copy link

I am also seeing the same issue where Date and time is showing as UNKNOWN. do we have any solution ?

@alexx-dvorkin
Copy link

I managed to work around the 'UNKNOWN' caption in the following manner:
If you look onto the linked commit above (a36769a), you will see that there's an expectation to read 'timestamp' attribute. However, it is not a part of XSD: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd

When I injected the timestamp after the report generation, but before the collection, in a manner resembling something like that:
sed -i 's/name="TestSuite"/name="TestSuite" timestamp="2017-10-05T10:36:22"/g' allure-results/TEST-TestSuite.xml
The injected time stamp appeared in the report title and description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:readers type:improvement Change that improves some user experience but can't be considered as a new feature
Projects
None yet
Development

No branches or pull requests