@Test public void testInit() throws Exception { testSuiteProperties = spy(TestSuitePropertiesTestUtils.getTestProps(this.getClass(), "valid", "suite_id")); ts = spy(new TestSuite(testSuiteProperties)); MockitoAnnotations.initMocks(this); testling.initTestSuite(); assertEquals(ts.getState(), TestSuiteState.RUNNING); assertNotNull(ts.getStartDate()); assertTrue(ts.getAbsolutePathOfTestSuiteFile().endsWith("valid" + File.separator + "testsuite.suite"), "test absolut path"); assertEquals(ts.getDbPrimaryKey(), -1); assertEquals(ts.getTestCases().size(), 1); assertEquals(ts.getId(), "suite_id"); }
@Override public void initTestSuite() throws SakuliInitException { checkConfiguration(testSuite); logger.info("initialize test suite with id '{}'", testSuite.getId()); testSuite.clearException(); testSuite.setState(TestSuiteState.RUNNING); testSuite.setStartDate(new Date()); testSuite.setStopDate(null); try { testSuite.setHost(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { testSuite.setHost("UNKNOWN HOST"); } if (testSuiteProperties.isLoadTestCasesAutomatic()) { try { testSuite.setTestCases(null); testSuite.setTestCases(TestSuiteHelper.loadTestCases(testSuiteProperties)); } catch (IOException e) { throw new SakuliInitException(e, String.format("Cannot read testsuite.suite '%s' file", testSuiteProperties.getTestSuiteSuiteFile().toString())); } } logger.info("test suite with guid '{}' has been initialized!", testSuite.getGuid()); logger.debug("test suite data after initialization: {}", testSuite.toString()); }
CommonInitializingServiceImpl implements InitializingService { @Override public void initTestSuite() throws SakuliInitException { checkConfiguration(testSuite); logger.info("initialize test suite with id '{}'", testSuite.getId()); testSuite.clearException(); testSuite.setState(TestSuiteState.RUNNING); testSuite.setStartDate(new Date()); testSuite.setStopDate(null); try { testSuite.setHost(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { testSuite.setHost("UNKNOWN HOST"); } if (testSuiteProperties.isLoadTestCasesAutomatic()) { try { testSuite.setTestCases(null); testSuite.setTestCases(TestSuiteHelper.loadTestCases(testSuiteProperties)); } catch (IOException e) { throw new SakuliInitException(e, String.format("Cannot read testsuite.suite '%s' file", testSuiteProperties.getTestSuiteSuiteFile().toString())); } } logger.info("test suite with guid '{}' has been initialized!", testSuite.getGuid()); logger.debug("test suite data after initialization: {}", testSuite.toString()); } }
CommonInitializingServiceImpl implements InitializingService { @Override public void initTestSuite() throws SakuliInitException { checkConfiguration(testSuite); logger.info("initialize test suite with id '{}'", testSuite.getId()); testSuite.clearException(); testSuite.setState(TestSuiteState.RUNNING); testSuite.setStartDate(new Date()); testSuite.setStopDate(null); try { testSuite.setHost(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { testSuite.setHost("UNKNOWN HOST"); } if (testSuiteProperties.isLoadTestCasesAutomatic()) { try { testSuite.setTestCases(null); testSuite.setTestCases(TestSuiteHelper.loadTestCases(testSuiteProperties)); } catch (IOException e) { throw new SakuliInitException(e, String.format("Cannot read testsuite.suite '%s' file", testSuiteProperties.getTestSuiteSuiteFile().toString())); } } logger.info("test suite with guid '{}' has been initialized!", testSuite.getGuid()); logger.debug("test suite data after initialization: {}", testSuite.toString()); }  }
CommonInitializingServiceImpl implements InitializingService { @Override public void initTestSuite() throws SakuliInitException { checkConfiguration(testSuite); logger.info("initialize test suite with id '{}'", testSuite.getId()); testSuite.clearException(); testSuite.setState(TestSuiteState.RUNNING); testSuite.setStartDate(new Date()); testSuite.setStopDate(null); try { testSuite.setHost(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { testSuite.setHost("UNKNOWN HOST"); } if (testSuiteProperties.isLoadTestCasesAutomatic()) { try { testSuite.setTestCases(null); testSuite.setTestCases(TestSuiteHelper.loadTestCases(testSuiteProperties)); } catch (IOException e) { throw new SakuliInitException(e, String.format("Cannot read testsuite.suite '%s' file", testSuiteProperties.getTestSuiteSuiteFile().toString())); } } logger.info("test suite with guid '{}' has been initialized!", testSuite.getGuid()); logger.debug("test suite data after initialization: {}", testSuite.toString()); }  @Override int getServicePriority(); @Override void initTestSuite(); }
CommonInitializingServiceImpl implements InitializingService { @Override public void initTestSuite() throws SakuliInitException { checkConfiguration(testSuite); logger.info("initialize test suite with id '{}'", testSuite.getId()); testSuite.clearException(); testSuite.setState(TestSuiteState.RUNNING); testSuite.setStartDate(new Date()); testSuite.setStopDate(null); try { testSuite.setHost(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { testSuite.setHost("UNKNOWN HOST"); } if (testSuiteProperties.isLoadTestCasesAutomatic()) { try { testSuite.setTestCases(null); testSuite.setTestCases(TestSuiteHelper.loadTestCases(testSuiteProperties)); } catch (IOException e) { throw new SakuliInitException(e, String.format("Cannot read testsuite.suite '%s' file", testSuiteProperties.getTestSuiteSuiteFile().toString())); } } logger.info("test suite with guid '{}' has been initialized!", testSuite.getGuid()); logger.debug("test suite data after initialization: {}", testSuite.toString()); }  @Override int getServicePriority(); @Override void initTestSuite();  }