Comments (5)
@alandefreitas thank you for the report.
there seems to be a lot of different variants of test output. and normally (at least based on the reports I have) the information is on the testcase instead. See the example here: https://github.com/mikepenz/action-junit-report/blob/main/test_results/junit-web-test/expected.xml#L19-L22
Which junit export do you use? in which language? Do you have example test result output?
from action-junit-report.
Yes. That makes sense. I'm sure you wouldn't have used the testcase element unless it worked for most use cases or at least some relevant use case. I've been using Catch2 to generate reports. The report files are OK but it's definitely not the most common generator. (In any case, I wrote a small tool to adjust the reports so it's all fine.)
So I quickly did some independent research and found out the failure element is the one that canonically allows the file
and line
elements. That might be wrong at some level, but it did make a lot of sense to me since each failure can be at a different line. In fact, if I recall correctly, the code that generates the annotations is iterating the failures and not the testcases.
The current code already tries to get it from the testcase and then the testsuite. I guess the testcase is the most common place for the filename then. On the other hand, if the failure element has a filename, this is even more specific than the testcase and probably what the report means. In that case, I think I would try the attribute from failure first, then fallback to the testcase, then the testsuite, because it generalizes well to what the code already does.
from action-junit-report.
@alandefreitas thank you very much for the additional details.
It surely makes sense if it is part of some standards, and doesn't seem as it would affect current functionality either. As such it would be great to get an example export (can be greatly simplified) to add to the test-cases, as I want to make sure such cases won't break with future updates
from action-junit-report.
Yes. That makes sense.
Here's a very small example generated with Catch2: https://gist.github.com/alandefreitas/2c92b53acadd4af446103985c79df47b
from action-junit-report.
Thank you
from action-junit-report.
Related Issues (20)
- Doesn't include errors HOT 4
- Option to not parse the annotations if number of failures is high HOT 1
- support "ignored" attribute HOT 5
- Different line number representation (xunit) HOT 3
- Weird behavior with multiple `report_paths` and failures not being processed HOT 4
- Test report stopped working without change HOT 8
- require_tests flag is not working HOT 5
- Editor points out that github_token is required HOT 1
- Skipped tests are show as passed when included_passed set to true HOT 3
- Test failures not correctly recognized HOT 8
- action using deprecate 'set-output' command HOT 2
- Documentation for Maven Surefire HOT 2
- Out of memory error on large project HOT 14
- Failed tests are not shown in Annotations HOT 9
- Check Run Not Created when update_check: true HOT 2
- act error: Error: The runs.using key in action.yml must be one of: [composite docker node12 node16], got node20 HOT 4
- Invalid character entity when using with dastardly HOT 6
- Error: Converting circular structure to JSON HOT 9
- Option to explicitly fail check run HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-junit-report.