Junit5: Why are strange characters in console output?

Created on 2 Oct 2020  ยท  5Comments  ยท  Source: junit-team/junit5

I use org.junit.platform.console.ConsoleLauncher as an eclipse run config.

Output:

Test plan execution started. Number of static tests: 2
โ•ท
โ”œโ”€ JUnit Vintage
โ””โ”€ JUnit Vintage finished after 3 ms.
โ”œโ”€ JUnit Jupiter
โ”‚  โ”œโ”€ MyExampleJUnit5UnitTest
โ”‚  โ”‚  โ”œโ”€ abc()
โ”‚  โ”‚  โ”‚       tags: []
โ”‚  โ”‚  โ”‚   uniqueId: [engine:junit-jupiter]/[class:testing.junit.MyExampleJUnit5UnitTest]/[method:abc()]
โ”‚  โ”‚  โ”‚     parent: [engine:junit-jupiter]/[class:testing.junit.MyExampleJUnit5UnitTest]
โ”‚  โ”‚  โ”‚     source: MethodSource [className = 'testing.junit.MyExampleJUnit5UnitTest', methodName = 'abc', methodParameterTypes = '']
test1
โ”‚  โ”‚  โ”‚   duration: 13 ms
โ”‚  โ”‚  โ”‚     status: โœ” SUCCESSFUL
โ”‚  โ”‚  โ”œโ”€ cba()
โ”‚  โ”‚  โ”‚       tags: []
โ”‚  โ”‚  โ”‚   uniqueId: [engine:junit-jupiter]/[class:testing.junit.MyExampleJUnit5UnitTest]/[method:cba()]
โ”‚  โ”‚  โ”‚     parent: [engine:junit-jupiter]/[class:testing.junit.MyExampleJUnit5UnitTest]
โ”‚  โ”‚  โ”‚     source: MethodSource [className = 'testing.junit.MyExampleJUnit5UnitTest', methodName = 'cba', methodParameterTypes = '']
test2
โ”‚  โ”‚  โ”‚   duration: 2 ms
โ”‚  โ”‚  โ”‚     status: โœ” SUCCESSFUL
โ”‚  โ””โ”€ MyExampleJUnit5UnitTest finished after 27 ms.
โ””โ”€ JUnit Jupiter finished after 42 ms.
Test plan execution finished. Number of all tests: 2

Test run finished after 69 ms
[         3 containers found      ]
[         0 containers skipped    ]
[         3 containers started    ]
[         0 containers aborted    ]
[         3 containers successful ]
[         0 containers failed     ]
[         2 tests found           ]
[         0 tests skipped         ]
[         2 tests started         ]
[         0 tests aborted         ]
[         2 tests successful      ]
[         0 tests failed          ]


What's that? -> 

???

Platform question

All 5 comments

I would assume you've probably run the tests in a console that doesn't have support for ANSI escape codes. If you were in a console that supported them you'd see output that looked more like the following.

image

๏ฟฝ[32mโœ” SUCCESSFUL

image

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. We prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

You can disable ansi colors using --disable-ansi-colors.

Thanks, but that does not work when i remember right. But i will try it again ASAP.

I was wrong. Now it works with --disable-ansi-colors ... thx!! :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

galan picture galan  ยท  3Comments

littleclay picture littleclay  ยท  3Comments

timandy picture timandy  ยท  3Comments

dotCipher picture dotCipher  ยท  6Comments

mfulton26 picture mfulton26  ยท  3Comments