reportportal/agent-java-junit

Test run is not finished

kristiansvensson opened this issue · 3 comments

version 2.7.2
Sorry that the code snippets here are in Kotlin, should hopefully be easy to understand anyway.
I'm using ReportPortalListener as follows:

fun main(args: Array<String>) {
    val core = JUnitCore()
    core.addListener(ReportPortalListener())
    core.run(BasicLogin::class.java)
}

Test class is as follows:

class BasicLogin {
    @Test
    fun login_givenWrongCredentials_loginPageIsShown() {
        assertTrue(true)
    }

    @Test
    fun login_givenCorrectCredentials_mainMenuIsShown() {
        assertTrue(false)
    }
}

When I run this the test run in ReportPortal is added as expected, but it is never finished.

I have debugged a bit and can see that testFinished() method in ReportPortalListener has a check for # character in method name which fails. Seems to be addressed by this PR that has not been merged.

@kristiansvensson #6 not completed. that's why it's still not merged.

but we also have new version, reimplemented from scratch by contributor.
Plz try v4 branch. and let us know

I made workaround by extending com.epam.reportportal.junit.ReportPortalListener and making calls to IListenerHandler from there. So at the moment I'm fine. I can wait for a new release.

@kristiansvensson then closing this issue.
we do some beta testing for new version of jUnit4 agent, but it's slow.

if you would like to participate and speed it up, plz contact me in Slack chat