Beispiel #1
0
  /**
   * A helper method to move the execution to another thread
   *
   * @throws ComponentNotFound
   */
  @Deprecated
  private void executeThread() throws ComponentNotFound {

    monitor.setUp();
    log.info("Connecting to application");
    monitor.connectToApplication();

    // Monitor before the test case
    for (GTestMonitor monitor : lTestMonitor) {
      monitor.init();
    }

    log.info("Executing test case");
    log.info("" + tc.getStep().size());

    List<StepType> lSteps = tc.getStep();
    int nStep = lSteps.size();

    for (int i = 0; i < nStep; i++) {
      log.info("---------------------");
      StepType step = lSteps.get(i);
      executeStep(step);
    }
    // Monitor after the test case
    for (GTestMonitor monitor : lTestMonitor) {
      monitor.term();
    }
    monitor.cleanUp();
  }
Beispiel #2
0
  /**
   * Parse and run test case.
   *
   * @throws ComponentNotFound
   */
  public void execute() throws ComponentNotFound {
    //
    try {
      monitor.setUp();

      log.info("Connecting to application...");
      monitor.connectToApplication();

      log.info("Application is connected.");

      // Monitor before the test case
      for (GTestMonitor monitor : lTestMonitor) {
        monitor.init();
      }

      log.info("Executing test case");
      log.info("" + tc.getStep().size());

      List<StepType> lSteps = tc.getStep();
      int nStep = lSteps.size();

      for (int i = 0; i < nStep; i++) {
        log.info("---------------------");
        StepType step = lSteps.get(i);
        executeStep(step);
      }
      // Monitor after the test case
      for (GTestMonitor monitor : lTestMonitor) {
        monitor.term();
      }
      monitor.cleanUp();

    } catch (GException e) {
      // GUITARLog.log.error("GUITAR Exception", e);
      for (GTestMonitor monitor : lTestMonitor) {
        monitor.exceptionHandler(e);
      }
      throw e;
    }
  }