Package com.google.gwt.junit.client.impl.JUnitHost

Examples of com.google.gwt.junit.client.impl.JUnitHost.TestInfo


   * @param batchingStrategy the batching strategy
   */
  public void maybeAddTestBlockForCurrentTest(GWTTestCase testCase,
      BatchingStrategy batchingStrategy) {
    if (batchingStrategy.isSingleTestOnly()) {
      TestInfo testInfo = new TestInfo(testCase.getSyntheticModuleName(),
          testCase.getClass().getName(), testCase.getName());
      List<TestInfo[]> testBlocks = new ArrayList<TestInfo[]>(1);
      testBlocks.add(new TestInfo[]{testInfo});
      getMessageQueue().addTestBlocks(testBlocks, false);
    }
View Full Code Here


    if (launchException != null) {
      testResult.addError(testCase, launchException);
      return;
    }

    currentTestInfo = new TestInfo(currentModule.getName(),
        testCase.getClass().getName(), testCase.getName());
    numTries++;
    if (messageQueue.hasResults(currentTestInfo)) {
      // Already have a result.
      processTestResult(testCase, testResult, strategy);
View Full Code Here

    if (launchException != null) {
      testResult.addError(testCase, launchException);
      return;
    }

    currentTestInfo = new TestInfo(currentModule.getName(),
        testCase.getClass().getName(), testCase.getName());
    numTries++;
    if (messageQueue.hasResults(currentTestInfo)) {
      // Already have a result.
      processTestResult(testCase, testResult, strategy);
View Full Code Here

   * @param batchingStrategy the batching strategy
   */
  public void maybeAddTestBlockForCurrentTest(GWTTestCase testCase,
      BatchingStrategy batchingStrategy) {
    if (batchingStrategy.isSingleTestOnly()) {
      TestInfo testInfo = new TestInfo(testCase.getSyntheticModuleName(),
          testCase.getClass().getName(), testCase.getName());
      List<TestInfo[]> testBlocks = new ArrayList<TestInfo[]>(1);
      testBlocks.add(new TestInfo[] {testInfo});
      getMessageQueue().addTestBlocks(testBlocks, false);
    }
View Full Code Here

      userAgents.add(userAgent);
      ensureClientStatus(clientId);

      // Cache the test results.
      for (Map.Entry<TestInfo, JUnitResult> entry : results.entrySet()) {
        TestInfo testInfo = entry.getKey();
        ensureResults(testInfo).put(clientId, entry.getValue());
      }

      clientStatusesLock.notifyAll();
    }
View Full Code Here

    }
    if (result != null && failureMessage != null) {
      RuntimeException ex = new RuntimeException(failureMessage);
      result.setExceptionWrapper(new ExceptionWrapper(ex));
    }  
    TestInfo currentTest = getCurrentTest();
    currentResults.put(currentTest, result);
    ++currentTestIndex;
    if (currentTestIndex < currentBlock.getTests().length) {
      // Run the next test after a short delay.
      DeferredCommand.addCommand(new Command() {
View Full Code Here

    String testMethod = Window.Location.getParameter(TESTFUNC_QUERY_PARAM);
    if (testClass == null || testMethod == null) {
      return null;
    }
    // TODO: support blocks of tests?
    TestInfo[] tests = new TestInfo[] {new TestInfo(GWT.getModuleName(),
        testClass, testMethod)};
    return new TestBlock(tests, 0);
  }
View Full Code Here

    return defaultValue;
  }

  private void runTest() {
    // Dynamically create a new test case.
    TestInfo currentTest = getCurrentTest();
    GWTTestCase testCase = null;
    Throwable caught = null;
    try {
      testCase = createNewTestCase(currentTest.getTestClass());
    } catch (Throwable e) {
      caught = e;
    }
    if (testCase == null) {
      RuntimeException ex = new RuntimeException(currentTest
          + ": could not instantiate the requested class", caught);
      JUnitResult result = new JUnitResult();
      result.setExceptionWrapper(new ExceptionWrapper(ex));
      reportResultsAndGetNextMethod(result);
      return;
    }

    testCase.setName(currentTest.getTestMethod());
    testCase.__doRunTest();
  }
View Full Code Here

    if (launchException != null) {
      testResult.addError(testCase, launchException);
      return;
    }

    currentTestInfo = new TestInfo(currentModule.getName(),
        testCase.getClass().getName(), testCase.getName());
    numTries++;
    if (messageQueue.hasResults(currentTestInfo)) {
      // Already have a result.
      processTestResult(testCase, testResult, strategy);
View Full Code Here

    if (launchException != null) {
      testResult.addError(testCase, launchException);
      return;
    }

    currentTestInfo = new TestInfo(currentModule.getName(),
        testCase.getClass().getName(), testCase.getName());
    numTries++;
    if (messageQueue.hasResults(currentTestInfo)) {
      // Already have a result.
      processTestResult(testCase, testResult, strategy);
View Full Code Here

TOP

Related Classes of com.google.gwt.junit.client.impl.JUnitHost.TestInfo

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.