void () { // Priority: error -> failure TestConsoleProperties.SELECT_FIRST_DEFECT.set(myProperties, true); mySuite.setStarted(); final SMTestProxy testsSuite = createSuiteProxy("my suite", mySuite); testsSuite.setStarted(); // pending test final SMTestProxy testPending = createTestProxy("testPending", testsSuite); testPending.setStarted(); myUIActionsHandler.onTestNodeAdded(myResultsViewer, testPending); testPending.setTestIgnored("", ""); //failed test final SMTestProxy testFailed = createTestProxy("testFailed", testsSuite); testFailed.setStarted(); myUIActionsHandler.onTestNodeAdded(myResultsViewer, testFailed); testFailed.setTestFailed("", "", false); // Second failed test just to check that first failed will be selected final SMTestProxy testFailed2 = createTestProxy("testFailed2", testsSuite); testFailed2.setStarted(); myUIActionsHandler.onTestNodeAdded(myResultsViewer, testFailed2); testFailed2.setTestFailed("", "", false); // finish suite testsSuite.setFinished(); assertNull(mySelectedTestProxy); //testing finished mySuite.setFinished(); assertNull(mySelectedTestProxy); myUIActionsHandler.onTestingFinished(myResultsViewer); assertEquals(testFailed, mySelectedTestProxy); }