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

JUnit XML should have timestamp attrubute #44

Open
evrom opened this issue Nov 14, 2024 · 2 comments · May be fixed by #45
Open

JUnit XML should have timestamp attrubute #44

evrom opened this issue Nov 14, 2024 · 2 comments · May be fixed by #45

Comments

@evrom
Copy link

evrom commented Nov 14, 2024

🤔 What's the problem you're trying to solve?

Looking at a report, the viewer doesn't know when the tests were executed. This makes it impossible to know if the report is recent or relevant if only the report is available.

✨ What's your proposed solution?

Add timestamp as an attribute to the testsuite element. It is supported by other test reporting libraries using the JUnit.xml format.

⛏ Have you considered any alternatives or workarounds?

A workaround is a custom script that runs the tests, which can store a timestamp before starting the tests, and then add the timestamp to the report.

📚 Any additional context?

No response

@davidjgoss davidjgoss transferred this issue from cucumber/cucumber-js Nov 14, 2024
@davidjgoss
Copy link
Contributor

Thanks for raising @evrom and doubly so for taking the time to make the PR in cucumber-js.

I've transferred your issue because we're currently replacing that formatter with the one produced by this repo (via #42) for consistency across different language implementations of Cucumber.

We can certainly consider the inclusion of timestamp here - cc @mpkorstanje

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Nov 14, 2024

While the timestamp is not in original XSD for JUnit, it does look like it is a common enough property. So I reckon we can support it without breaking anything.

We'll have to update the README to say something to that effect though.

mpkorstanje added a commit that referenced this issue Nov 15, 2024
While the timestamp attribute is not part of the JUnit or Surefire XSD
in practice it seems to be a common enough property[1] that we can add
it without expecting any of the popular tools to break.

Closes: #44

 1. https://github.com/testmoapp/junitxml
@mpkorstanje mpkorstanje linked a pull request Nov 15, 2024 that will close this issue
7 tasks
mpkorstanje added a commit that referenced this issue Nov 15, 2024
While the timestamp attribute is not part of the JUnit or Surefire XSD
in practice it seems to be a common enough property[1] that we can add
it without expecting any of the popular tools to break.

Closes: #44

 1. https://github.com/testmoapp/junitxml
mpkorstanje added a commit that referenced this issue Nov 15, 2024
While the timestamp attribute is not part of the JUnit or Surefire XSD
in practice it seems to be a common enough property[1] that we can add
it without expecting any of the popular tools to break.

Closes: #44

 1. https://github.com/testmoapp/junitxml
mpkorstanje added a commit that referenced this issue Nov 15, 2024
While the timestamp attribute is not part of the JUnit or Surefire XSD
in practice it seems to be a common enough property[1] that we can add
it without expecting any of the popular tools to break.

Closes: #44

 1. https://github.com/testmoapp/junitxml
mpkorstanje added a commit that referenced this issue Nov 15, 2024
While the timestamp attribute is not part of the JUnit or Surefire XSD
in practice it seems to be a common enough property[1] that we can add
it without expecting any of the popular tools to break.

Closes: #44

 1. https://github.com/testmoapp/junitxml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants