SMTestProxy () { //if we can locate test - we will send output to it, otherwise to current test suite SMTestProxy currentProxy = null; Iterator<SMTestProxy> iterator = myRunningTestsFullNameToProxy.values().iterator(); if (iterator.hasNext()) { //current test currentProxy = iterator.next(); if (iterator.hasNext()) { //if there are multiple tests running call put output to the suite currentProxy = null; } } if (currentProxy == null) { //current suite // // ProcessHandler can fire output available event before processStarted event final SMTestProxy currentSuite = mySuitesStack.getCurrentSuite(); currentProxy = currentSuite != null ? currentSuite : myTestsRootProxy; } return currentProxy; }