@Test public void testContainsExceptionsStep() throws Exception { TestSuite ts = new TestSuite(); TestCase tc = new TestCase(null, null); ts.addTestCase(tc); TestCaseStep step = new TestCaseStep(); step.addException(new SakuliCheckedException("bla3")); tc.addStep(step); assertTrue(SakuliExceptionHandler.containsException(ts)); }
static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; }
SakuliExceptionHandler { static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; } }
SakuliExceptionHandler { static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; }  }
SakuliExceptionHandler { static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; }  static List<Exception> getAllExceptions(TestSuite testSuite); static Path getScreenshotFile(Exception e); static Exception castTo(SakuliException e); void handleException(Exception e); boolean isAlreadyProcessed(Exception e); boolean resumeToTestExecution(Exception e); void handleException(Exception e, boolean resumeOnException); void handleException(String exceptionMessage, boolean resumeOnException); void handleException(String exceptionMessage, RegionImpl lastRegion, boolean resumeOnException); void handleException(Exception e, RegionImpl lastRegion, boolean resumeOnException); void handleException(LogResult logResult); }
SakuliExceptionHandler { static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; }  static List<Exception> getAllExceptions(TestSuite testSuite); static Path getScreenshotFile(Exception e); static Exception castTo(SakuliException e); void handleException(Exception e); boolean isAlreadyProcessed(Exception e); boolean resumeToTestExecution(Exception e); void handleException(Exception e, boolean resumeOnException); void handleException(String exceptionMessage, boolean resumeOnException); void handleException(String exceptionMessage, RegionImpl lastRegion, boolean resumeOnException); void handleException(Exception e, RegionImpl lastRegion, boolean resumeOnException); void handleException(LogResult logResult);  }