void (TestPlan testPlan) { myTestPlan = testPlan; if (mySendTree) { for (TestIdentifier root : myTestPlan.getRoots()) { assert root.isContainer(); for (TestIdentifier testIdentifier : myTestPlan.getChildren(root)) { String legacyReportingName = testIdentifier.getLegacyReportingName(); if (legacyReportingName != null && legacyReportingName.equals(myRootName)) setPresentableName(testIdentifier.getDisplayName()); sendTreeUnderRoot(testIdentifier, new HashSet<>()); } } myPrintStream.println("##teamcity[treeEnded]"); } if (myRootName != null) { int lastPointIdx = myRootName.lastIndexOf('.'); String name = myRootName; String comment = null; if (lastPointIdx >= 0) { name = myRootName.substring(lastPointIdx + 1); comment = myRootName.substring(0, lastPointIdx); } String messageName = (myPresentableName == null || myPresentableName.isEmpty()) ? escapeName(name) : myPresentableName; myPrintStream.println("##teamcity[rootName name = '" + messageName + (comment != null ? ("' comment = '" + escapeName(comment)) : "") + "'" + " location = 'java:suite://" + escapeName(myRootName) + "']"); } }