Examples of JunitResult


Examples of com.google.gwt.junit.client.impl.JUnitResult

    boolean parallelTesting = numClients > 1;

    for (Entry<String, JUnitResult> entry : results.entrySet()) {
      String clientId = entry.getKey();
      JUnitResult result = entry.getValue();
      assert (result != null);
      Throwable exception = result.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 " + clientId;
        if (exception instanceof AssertionFailedError) {
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

  }

  // CHECKSTYLE_OFF
  protected JUnitResult __getOrCreateTestResult() {
    if (result == null) {
      result = new JUnitResult();
    }
    return result;
  }
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

      tearDown();
    } catch (Throwable e) {
      // ignore any exceptions thrown from tearDown
    }

    JUnitResult myResult = __getOrCreateTestResult();
    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);
        }
      }
      myResult.setExceptionWrapper(ew);
    }

    testIsFinished = true;
    resetAsyncState();
    GWTRunner.get().reportResultsAndGetNextMethod(myResult);
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

      String msg = RPCServletUtils.readContentAsGwtRpc(request);
      System.err.println("Fatal error: " + msg);
      System.exit(1);
    } else if (requestURI.endsWith("/junithost/error/launch")) {
      String requestPayload = RPCServletUtils.readContentAsGwtRpc(request);
      JUnitResult result = new JUnitResult();
      initResult(request, result);
      result.setException(new JUnitFatalLaunchException(requestPayload));
      getHost().reportFatalLaunch(createNewClientInfo(null, request), result);
    } else {
      super.service(request, response);
    }
  }
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

  protected void service(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    String requestURI = request.getRequestURI();
    if (requestURI.endsWith("/junithost/loadError")) {
      String requestPayload = RPCServletUtils.readContentAsUtf8(request);
      JUnitResult result = new JUnitResult();
      initResult(request, result);
      result.setException(new JUnitFatalLaunchException(requestPayload));
      getHost().reportFatalLaunch(getClientId(request), null, result);
    } else {
      super.service(request, response);
    }
  }
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

    boolean parallelTesting = numClients > 1;

    for (Entry<String, JUnitResult> entry : results.entrySet()) {
      String clientId = entry.getKey();
      JUnitResult result = entry.getValue();
      assert (result != null);
      Throwable exception = result.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 " + clientId;
        if (exception instanceof AssertionFailedError) {
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

    assert results.size() == messageQueue.getNumClients() : results.size()
        + " != " + messageQueue.getNumClients();

    for (Entry<ClientStatus, JUnitResult> entry : results.entrySet()) {
      ClientStatus client = entry.getKey();
      JUnitResult result = entry.getValue();
      assert (result != null);
      Throwable exception = result.getException();

      // Let the user know the browser in which the failure happened.
      if (exception != null) {
        String msg = "Remote test failed at " + client.getDesc();
        if (exception instanceof AssertionFailedError) {
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

  protected void service(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    String requestURI = request.getRequestURI();
    if (requestURI.endsWith("/junithost/loadError")) {
      String requestPayload = RPCServletUtils.readContentAsUtf8(request);
      JUnitResult result = new JUnitResult();
      initResult(request, result);
      result.setException(new JUnitFatalLaunchException(requestPayload));
      getHost().reportFatalLaunch(createNewClientInfo(null), result);
    } else {
      super.service(request, response);
    }
  }
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

  }

  // CHECKSTYLE_OFF
  protected JUnitResult __getOrCreateTestResult() {
    if (result == null) {
      result = new JUnitResult();
    }
    return result;
  }
View Full Code Here

Examples of com.google.gwt.junit.client.impl.JUnitResult

    // Remove the UncaughtExceptionHandler we may have installed in __doRunTest.
    GWT.setUncaughtExceptionHandler(null);
    uncaughtHandler = null;

    JUnitResult myResult = __getOrCreateTestResult();
    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);
        }
      }
      myResult.setExceptionWrapper(ew);
    }

    testIsFinished = true;
    resetAsyncState();
    GWTRunner.get().reportResultsAndGetNextMethod(myResult);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.