Package com.google.gwt.junit.client

Examples of com.google.gwt.junit.client.Trial


    results.setAgent(agent);
    String machine = request.getRemoteHost();
    results.setHost(machine);
    List trials = results.getTrials();
    for (int i = 0; i < trials.size(); ++i) {
      Trial trial = (Trial) trials.get(i);
      ExceptionWrapper ew = trial.getExceptionWrapper();
      trial.setException(deserialize(ew));
    }
    host.reportResults(testClassName, results);
    return host.getNextTestName(getClientId(), testClassName,
        TIME_TO_WAIT_FOR_TESTNAME);
  }
View Full Code Here


      resultElement.setAttribute("agent", result.getAgent());

      List trials = result.getTrials();

      for (Iterator it = trials.iterator(); it.hasNext();) {
        Trial trial = (Trial) it.next();
        Element trialElement = toElement(doc, trial);
        resultElement.appendChild(trialElement);
      }

      return resultElement;
View Full Code Here

      resultElement.setAttribute("agent", result.getAgent());

      List trials = result.getTrials();

      for (Iterator it = trials.iterator(); it.hasNext();) {
        Trial trial = (Trial) it.next();
        Element trialElement = toElement(doc, trial);
        resultElement.appendChild(trialElement);
      }

      return resultElement;
View Full Code Here

    // TODO(tobyr) - Consider making this logic polymorphic which will remove
    //               instanceof test
    //
    // If this is not a benchmark, we have to create a fake trial run
    if ( ! (outer instanceof com.google.gwt.junit.client.Benchmark) ) {
      Trial trial = new Trial();
      long testDurationMillis = System.currentTimeMillis() - testBeginMillis;
      trial.setRunTimeMillis( testDurationMillis );

      if (ex != null) {
        ExceptionWrapper ew = new ExceptionWrapper(ex);
        if (checkPoints != null) {
          for (int i = 0, c = checkPoints.size(); i < c; ++i) {
            ew.message += "\n" + checkPoints.get(i);
          }
        }
        trial.setExceptionWrapper( ew );
      }

      trials.add( trial );
    } else {
      // If this was a benchmark, we need to handle exceptions specially
      // If an exception occurred, it happened without the trial being recorded
      // We, unfortunately, don't know the trial parameters at this point.
      // We should consider putting the exception handling code directly into
      // the generated Benchmark subclasses.
      if (ex != null) {
        ExceptionWrapper ew = new ExceptionWrapper(ex);
        if (checkPoints != null) {
          for (int i = 0, c = checkPoints.size(); i < c; ++i) {
            ew.message += "\n" + checkPoints.get(i);
          }
        }
        Trial trial = new Trial();
        trial.setExceptionWrapper( ew );
        trials.add( trial );
      }
    }

    results.setSourceRef( getDocumentLocation() );
View Full Code Here

    results.setAgent(agent);
    String machine = request.getRemoteHost();
    results.setHost(machine);
    List trials = results.getTrials();
    for (int i = 0; i < trials.size(); ++i) {
      Trial trial = (Trial) trials.get(i);
      ExceptionWrapper ew = trial.getExceptionWrapper();
      trial.setException(deserialize(ew));
    }
    host.reportResults(testClassName, results);
    return host.getNextTestName(getClientId(), testClassName,
        TIME_TO_WAIT_FOR_TESTNAME);
  }
View Full Code Here

    boolean parallelTesting = numClients > 1;

    for (int i = 0; i < results.size(); ++i) {
      TestResults result = (TestResults) results.get(i);
      Trial firstTrial = (Trial) result.getTrials().get(0);
      Throwable exception = firstTrial.getException();

      // In the case that we're running multiple clients at once, we need to
      // let the user know the browser in which the failure happened
      if (parallelTesting && exception != null) {
        String msg = "Remote test failed at " + result.getHost() + " on "
View Full Code Here

TOP

Related Classes of com.google.gwt.junit.client.Trial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.