Examples of JunitResult


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

    }
    if (results.size() != numClients) {
      return true;
    }
    for (Entry<ClientStatus, JUnitResult> entry : results.entrySet()) {
      JUnitResult result = entry.getValue();
      if (result == null) {
        return true;
      }
      Throwable exception = result.getException();
      if (exception != null && !isMember(exception, THROWABLES_NOT_RETRIED)) {
        return true;
      }
    }
    return false;
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.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.puppetlabs.geppetto.junitresult.JunitResult

*/
public class TestTessuite extends TestCase {

  public void testLoad_Bougie_testsuite() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/BougieTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);

    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.BougieTest", rootsuite.getName());
    assertEquals(2, rootsuite.getTests());
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

    assertEquals("IBM Corporation", p.getValue());
  }

  public void testLoad_CarborateurTest() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/CarborateurTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);
    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.CarburateurTest", rootsuite.getName());

    // should have one testcase with a failure
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

  }

  public void testLoad_DelcoTest() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/DelcoTest_testsuite.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);
    assertTrue("should be a Testsuite instance", result instanceof Testsuite);
    Testsuite rootsuite = (Testsuite) result;
    assertEquals("net.cars.engine.DelcoTest", rootsuite.getName());

    assertEquals("Rotation is simulated for a four spark engine with an angle of 0?.\n", rootsuite.getSystem_out());
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

  }

  public void test_aggregatorSampleTest() throws IOException, TransformerException, ParserConfigurationException {
    JunitresultAggregator aggregator = new JunitresultAggregator();
    File root = TestDataProvider.getTestFile(new Path("testData/allresults/"));
    JunitResult result = aggregator.aggregate(root, root);
    assertTrue(result instanceof Testsuites);
    Testsuites testsuite = (Testsuites) result;
    assertEquals("allresults", testsuite.getName());
    assertEquals(1, testsuite.getErrors());
    assertEquals(13, testsuite.getTests());
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

      root = TestDataProvider.getTestFile(new Path("testData/test_results"));
      root.mkdir();

      FileUtils.unzip(TestDataProvider.getTestFile(new Path("testData/test_results.zip")), root);

      JunitResult result = aggregator.aggregate(root, root);
      assertTrue(result instanceof Testsuites);
      Testsuites testsuite = (Testsuites) result;
      assertEquals("test_results", testsuite.getName());
      assertEquals(3, testsuite.getErrors());
      assertEquals(1360, testsuite.getTests());
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

*/
public class TestTestrun extends TestCase {

  public void testLoad_Bougie_testrun() throws IOException {
    File f = TestDataProvider.getTestFile(new Path("testData/BougieTest_testrun.xml"));
    JunitResult result = JunitresultLoader.loadFromXML(f);

    assertTrue("should be a Testrun instance", result instanceof Testrun);
    Testrun testrun = (Testrun) result;
    assertEquals("net.cars.engine.BougieTest", testrun.getName());
    assertEquals(2, testrun.getTests());
View Full Code Here

Examples of com.puppetlabs.geppetto.junitresult.JunitResult

        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case JunitresultPackage.JUNIT_RESULT: {
        JunitResult junitResult = (JunitResult) theEObject;
        T result = caseJunitResult(junitResult);
        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
View Full Code Here

Examples of jp.vmi.junit.result.JUnitResult

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        TestSuite testSuite = (TestSuite) invocation.getThis();
        Context context = (Context) invocation.getArguments()[CONTEXT];
        testSuite.setWebDriverName(context.getWrappedDriver().getClass().getSimpleName());
        JUnitResult jUnitResult = (context instanceof JUnitResultHolder) ? ((JUnitResultHolder) context).getJUnitResult() : null;
        HtmlResult htmlResult = (context instanceof HtmlResultHolder) ? ((HtmlResultHolder) context).getHtmlResult() : null;
        StopWatch sw = testSuite.getStopWatch();
        LogRecorder slr = new LogRecorder(context.getPrintStream());
        sw.start();
        if (!testSuite.isError()) {
            String msg = "Start: " + testSuite;
            log.info(msg);
            slr.info(msg);
        }
        initTestSuiteResult(jUnitResult, testSuite);
        try {
            return invocation.proceed();
        } catch (Throwable t) {
            String msg = t.getMessage();
            log.error(msg);
            slr.error(msg);
            throw t;
        } finally {
            if (!testSuite.isError()) {
                String msg = "End(" + sw.getDurationString() + "): " + testSuite;
                log.info(msg);
                slr.info(msg);
            }
            sw.end();
            if (jUnitResult != null)
                jUnitResult.endTestSuite(testSuite);
            if (htmlResult != null)
                htmlResult.generate(testSuite);
        }
    }
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.