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

[java-junit] show annotations on PR "Files changed" tab next to code line related to the failure #208

Closed
atsu85 opened this issue Nov 19, 2022 · 3 comments · Fixed by #209

Comments

@atsu85
Copy link
Contributor

atsu85 commented Nov 19, 2022

Current situation

Currently show annotations on pull request "Files changed" tab next to code line related to the failure works nicely when JUnit report is generated for example on NodeJS using jest-junit reporter:
image

but the same feature doesn't work on Java Virutal Machine (Java/Kotlin/Groovy/...)

Problem

Currently the code that parses exception stack trace lines fails to parse the line if the line:

  • starts with whitespace (maybe there are some frameworks that generate JUnit xml report file where stack trace lines don't start with whitespaces, but that isn't the case for gradle with JUnit - probably dominant behavior)
  • when running on Java Runtime Environment version 9 or newer, when application code is loaded with custom ClassLoader (like Spring Boot) or when application source code is in Java 9 module

Example of stack trace line, that isn't parsed:

  at app//com.foo.Main.run(Main.java:101)

Expected behaviour

On JVM (Java/Kotlin/Groovy/...) annotations should be added to pull request "Files changed" tab next to code line related to the failure based on stack trace

@atsu85
Copy link
Contributor Author

atsu85 commented Nov 19, 2022

I'll send the PR shortly

atsu85 added a commit to atsu85/test-reporter that referenced this issue Nov 19, 2022
atsu85 added a commit to atsu85/test-reporter that referenced this issue Nov 19, 2022
@atsu85
Copy link
Contributor Author

atsu85 commented Nov 19, 2022

Pull request that fixes this issue is ready to be merged!

@dorny thanks for open-sourcing this project!

@dorny dorny closed this as completed in 3a48f6e Nov 29, 2022
dorny added a commit that referenced this issue Nov 29, 2022
…ions-on-pr-changed-files

Fix #208 - java-junit: show annotations on PR changed files
@atsu85
Copy link
Contributor Author

atsu85 commented Dec 2, 2022

Tested that the feature is released and works as expected :)
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant