Exemplo n.º 1
0
  @BeforeClass(alwaysRun = true)
  public void initTC() throws Exception {
    if (testSuite == null) {
      initTestSuiteParameter();
    }
    LOGGER.info("............................INITIALIZE TEST-CASE with {}", initParameter);
    String testCaseName = this.getClass().getSimpleName();
    initParameter = getTestCaseInitParameter();
    if (initParameter == null) {
      throw new SakuliException("init parameter have to be set!");
    }
    testSuite = BeanLoader.loadBean(TestSuite.class);

    // start sahi controlled browser if needed
    initSahiBrowser();

    testSuite.addTestCase(new TestCaseBuilder(testCaseName, initParameter.getTestCaseId()).build());
    testCaseAction = BeanLoader.loadTestCaseAction();

    // add the the testcase folder as image folder
    if (Files.exists(getTestCaseFolder())) {
      initParameter.addImagePath(getTestCaseFolder().toString());
    }
    initTestCaseAction(initParameter);
    LOGGER.info(
        "............................START TEST-CASE '{}' - {}",
        initParameter.getTestCaseId(),
        testCaseName);
    counter = 0;
    startTimeCase = DateTime.now();
  }