Is it possible for TeamCity 4 to detect service messages generated inside jUnit tests?

We're trying to get a jUnit test to send message to the TeamCity dashboard.

public class SimpleTest {
    @Test
    public void checkOperationOfTeamCityMessages() {
        System.out.println("##teamcity[buildStatus status = 'FAILURE' text = 'some aftertext' ]");
    }
}


We're using ant and the jUnit task to run this test.  The message shows up in the build log but not on the Dashboard.

When we try using ant to echo the same message it works fine.

<echo message="##teamcity[buildStatus status = 'FAILURE' text = 'some aftertext' ]" />


Is it possible to create service messages from inside the tests?

1 comment

Hello Andrew,

Unfortunately this is not possible for now. We have related request for this, please watch/vote for it: http://youtrack.jetbrains.net/issue/TW-5696

Kind regards,
Marina

0

Please sign in to leave a comment.