I run according to the documentation with a test class with 30 tests inside org.junit.platform.launcher.Launcher
I have a function launcher.registerTestExecutionListeners(listener)
registered in org.junit.platform.launcher.listeners.TestExecutionSummary
I read the following and don't know how to use it: https://junit.org/junit5/docs/current/user-guide/#running-tests-listeners https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html
I need listeners: progress - what test is currently running, are there any errors printed, etc.
For example this one:
val listener: SummaryGeneratingListener = SummaryGeneratingListener()
launcher.registerTestExecutionListeners(listener)
val summary: TestExecutionSummary = listener.summary
val failed: Long = summary.testsFailedCount
I need commands: stop/pause/exit/skip, etc.
I need code examples on how to use it. Can anyone help with links?
The next question is asked here: How to terminate the application and make the launcher return to its call by the stop command?