Feature request: add file & line information to JUnit report #2420
rursprung
started this conversation in
Feature requests
Replies: 2 comments 3 replies
-
Thanks for the issue. This has come up before — unfortunately, the default libtest runner doesn't provide this info. There are heuristic ways to get this info (e.g. by searching through the source) but they're all a bit janky and I haven't spent too much time investigating. |
Beta Was this translation helpful? Give feedback.
3 replies
-
btw, i also asked for more detailed JSON output from libtest and it seems that this is on the roadmap, in case you're interested: https://internals.rust-lang.org/t/libtest-provide-position-in-json-output/23169 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
if
file
andline
are present they can be used by various report generators (e.g. when uploading the JUnit result to GitHub as a check result in a workflow, likejunit-report-action
) to annotate the code with the result.Proposal
the JUnit generator should fill the
file
andline
information for the tests. it should point to the line which defines the test function (i.e.fn foo() {
).Alternatives
No response
Additional context
i found this description of the JUnit XML structure which has e.g. this example:
Beta Was this translation helpful? Give feedback.
All reactions