congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RichLogger
Code IndexAdd Tabnine to your IDE (free)

How to use
RichLogger
in
com.novocode.junit

Best Java code snippets using com.novocode.junit.RichLogger (Showing top 13 results out of 315)

origin: com.novocode/junit-interface

 private void debugOrInfo(String msg)
 {
  if(settings.verbose) logger.info(msg);
  else logger.debug(msg);
 }
}
origin: com.novocode/junit-interface

void error(String s, Throwable t)
{
 error(s);
 if(t != null && (settings.logAssert || !(t instanceof AssertionError))) logStackTrace(t);
}
origin: com.novocode/junit-interface

private void logStackTrace(Throwable t)
{
 StackTraceElement[] trace = t.getStackTrace();
 String testClassName = currentTestClassName.peek();
 String testFileName = settings.color ? findTestFileName(trace, testClassName) : null;
 logStackTracePart(trace, trace.length-1, 0, t, testClassName, testFileName);
}
origin: com.novocode/junit-interface

for(int i=top; i<=m; i++) error("    at " + stackTraceElementToString(trace[i], testClassName, testFileName));
if(m0 != m)
 error("    ...");
 error("    ... " + framesInCommon + " more");
logStackTraceAsCause(trace, t.getCause(), testClassName, testFileName);
origin: com.novocode/junit-interface

private void logStackTraceAsCause(StackTraceElement[] causedTrace, Throwable t, String testClassName, String testFileName)
{
 if(t == null) return;
 StackTraceElement[] trace = t.getStackTrace();
 int m = trace.length - 1, n = causedTrace.length - 1;
 while(m >= 0 && n >= 0 && trace[m].equals(causedTrace[n]))
 {
  m--;
  n--;
 }
 error("Caused by: " + t);
 logStackTracePart(trace, m, trace.length-1-m, t, testClassName, testFileName);
}
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.error("Execution of test "+ansiName+" failed: "+ansiMsg, error);
 }
});
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.info("Test "+ansiName+" ignored");
 }
});
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.debug("Test "+ansiName+" finished" + durationSuffix());
 }
});
origin: com.novocode/junit-interface

@Override
public void testFinished(Description desc)
{
 uncapture(false);
 postIfFirst(new InfoEvent(desc, Status.Success) {
  void logTo(RichLogger logger) {
   logger.debug("Test "+ansiName+" finished" + durationSuffix());
  }
 });
 logger.popCurrentTestClassName();
}
origin: com.novocode/junit-interface

RichLogger logger = new RichLogger(loggers, settings, testClassName);
EventDispatcher ed = new EventDispatcher(logger, eventHandler, settings, fingerprint);
JUnitCore ju = new JUnitCore();
origin: com.novocode/junit-interface

@Override
public void testStarted(Description description)
{
 recordStartTime(description);
 logger.pushCurrentTestClassName(description.getClassName());
 debugOrInfo("Test " + settings.buildInfoName(description) + " started");
 capture();
}
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.error("Test "+ansiName+" failed: "+ansiMsg + durationSuffix(), error);
 }
});
origin: com.novocode/junit-interface

void uncapture(boolean replay)
{
 if(settings.quiet && capture != null)
 {
  capture.stop();
  if(replay)
  {
   try { capture.replay(); }
   catch(IOException ex) { logger.error("Error replaying captured stdio", ex); }
  }
  capture = null;
 }
}
com.novocode.junitRichLogger

Most used methods

  • <init>
  • debug
  • error
  • findTestFileName
  • info
  • logStackTrace
  • logStackTraceAsCause
  • logStackTracePart
  • popCurrentTestClassName
  • pushCurrentTestClassName
  • stackTraceElementToString
  • warn
  • stackTraceElementToString,
  • warn

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JCheckBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now