Examples of SystemOutputCapture


Examples of org.pluginbuilder.autotestsuite.junit3.SystemOutputCapture

    for (RunListener listener : listeners)
      core.addListener( listener );

    Request request = RequestCompatibility.createRequest( classes );

    SystemOutputCapture capture = new SystemOutputCapture();
    capture.start();

    Result result;
    try {
      result = core.run( request );
    } finally {
      capture.stop();
    }

    for (RunListener listener : listeners) {
      if (listener instanceof JUnit4Formatter) {
        try {
          JUnit4Formatter formatter = (JUnit4Formatter) listener;
          formatter.setSystemOutput( capture.getCapturedOut() );
          formatter.setSystemError( capture.getCapturedErr() );
          formatter.save();
        } catch (IOException ignored) {
          ignored.printStackTrace();
        }
      }
View Full Code Here

Examples of org.pluginbuilder.autotestsuite.junit3.SystemOutputCapture

    // fTestResult.addListener( this );
    fTestResult.addListener( formatter );
    long start = System.currentTimeMillis();
    fireStartTestSuite();

    SystemOutputCapture capture = new SystemOutputCapture();
    capture.start();
    try {
      // pm.snapshot(1); // before
      fSuite.run( fTestResult );
    } finally {
      // pm.snapshot(2); // after
      capture.stop();
      sendOutAndErr( capture.getCapturedOut(), capture.getCapturedErr() );
      fJunitTest.setCounts( fTestResult.runCount(), fTestResult.failureCount(), fTestResult.errorCount() );
      fJunitTest.setRunTime( System.currentTimeMillis() - start );
    }

    fireEndTestSuite();
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.