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

Nested test tree not formatted correctly #46

Open
tmarback opened this issue May 18, 2023 · 1 comment
Open

Nested test tree not formatted correctly #46

tmarback opened this issue May 18, 2023 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@tmarback
Copy link

tmarback commented May 18, 2023

Reproducer: https://github.com/tmarback/tree-reporter-issue

When using nested tests, the "bars" that draw the test tree are incorrect, with the horizontal lines for the test classes originating a layer above where they should:

(note how for the 1st-level nested classes the horizontal line crosses 2 different vertical lines, while on the 2nd-level nested classes the horizonal line goes past the vertical line)

PS <snip>\tree-reporter> mvn test
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< test:tree-reporter >-------------------------
[INFO] Building tree-reporter 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
<snip>
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] +--Outer - 0.056s
[INFO] |  +-- [OK] testOuter1 - 0.016s
[INFO] |  +-- [OK] testOuter2 - 0s
[INFO] |  '-- [OK] testOuter3 - 0s
[INFO] +--.--Outer Inner 2 - 0.005s
[INFO] |  |  +-- [OK] testInner1 - 0.001s
[INFO] |  |  +-- [OK] testInner2 - 0.001s
[INFO] |  |  '-- [OK] testInner3 - 0.001s
[INFO] +--.--Outer Inner 3 - 0.005s
[INFO] |  |  +-- [OK] testInner1 - 0s
[INFO] |  |  +-- [OK] testInner2 - 0.001s
[INFO] |  |  '-- [OK] testInner3 - 0s
[INFO] |  '--.--Outer Inner 3 Inner-er 2 - 0.013s
[INFO] |     |  +-- [OK] testInnerer1 - 0.001s
[INFO] |     |  +-- [OK] testInnerer2 - 0s
[INFO] |     |  '-- [OK] testInnerer3 - 0s
[INFO] |  '--.--Outer Inner 3 Inner-er 3 - 0.013s
[INFO] |     |  +-- [OK] testInnerer1 - 0s
[INFO] |     |  +-- [OK] testInnerer2 - 0s
[INFO] |     |  '-- [OK] testInnerer3 - 0.001s
[INFO] |  '--.--Outer Inner 3 Inner-er 1 - 0.013s
[INFO] |     |  +-- [OK] testInnerer1 - 0s
[INFO] |     |  +-- [OK] testInnerer2 - 0.001s
[INFO] |     |  '-- [OK] testInnerer3 - 0s
[INFO] +-----Outer Inner 1 - 0.005s
[INFO] |     +-- [OK] testInner1 - 0s
[INFO] |     +-- [OK] testInner2 - 0.001s
[INFO] |     '-- [OK] testInner3 - 0s
[INFO] 
[INFO] Results:
[INFO]
[INFO] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.787 s
[INFO] Finished at: 2023-05-18T03:39:04-07:00
[INFO] ------------------------------------------------------------------------

Also the @DisplayName names seem to be getting appended at each level, which from the examples doesn't seem to be the expected.

@fabriciorby fabriciorby self-assigned this Jul 31, 2023
@fabriciorby
Copy link
Owner

Sorry for the delay and thanks for pointing out, I'll try working on this issue as soon as I can

@fabriciorby fabriciorby added bug Something isn't working help wanted Extra attention is needed labels Dec 1, 2024
@fabriciorby fabriciorby pinned this issue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants