apache / apache/maven-surefire
[SUREFIRE-1335] Surefire final test report format demark methodname with '#' for IDE integration
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Mikhail Fedorov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tttomat19)** opened **[SUREFIRE-1335](https://issues.apache.org/jira/browse/SUREFIRE-1335?redirect=false)** and commented
The current final report/summary of the test cases have the following format (in simple cases):
> Results :
>
> Tests in error:
> TestTest.test:12 » IllegalArgument
Full rules are described in file newerrorsummary.md
Initially the report format had separtor '#' symbols for methods (but line numbers were in braces).
Currently it's point symbol, and line number is separated with colon.
The suggestion is to have the following format (at least for simple cases)
> TestTest#test:12 » IllegalArgument
The reason is IntelliJ Idea does not support goto class/file action in format with point as method name separator.
When replaced with '#', surefire plugin user will be able to do simple copy-paste from build console, go to Intellij IDE, press Ctrl-N and go to particular line where the error happened (see attached goto_line.png screenshot),
I also wondered maybe Eclipse maven build console supports this format to go to the line quickly (appears that it is not so, see eclipse screenshot).
The stacktraces from above result report, which have other format, supported by IDEs seem to be not enough in real projects, because I have to scroll up too much, through stacktraces.
Other solution might be to print next to each failed test [Class:33] that both eclipse and Intellij supports.
I tried to see if it would be possible for Intellij to parse this line, but it seems to be hard to distinguish method name from class name if it's separated with point symbol.
Intellij currently supports goto
Class#methodName
Class#methodName:33
even some weird formats line
Class on line 33
Class#L33
Eclipse supports:
Class:33 (you may see blue highlighted strings on eclipse.png screenshot)
---
**Attachments:**
- [eclipse.png](https://issues.apache.org/jira/secure/attachment/12853430/eclipse.png) (_18.21 kB_)
- [goto_line.png](https://issues.apache.org/jira/secure/attachment/12853429/goto_line.png) (_16.15 kB_)
Contributor guide
Research direction
Start by reading newerrorsummary.md and locating the code that assembles the final test report and summary. Check how simple test failures currently format the class, method separator, and line number. Done means the report uses the requested Class#method:line format for applicable failures and preserves the relevant error output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100