Class LogFileRule

  • All Implemented Interfaces:
    org.junit.rules.MethodRule

    public class LogFileRule
    extends Object
    implements org.junit.rules.MethodRule
    Junit rule for parsing log files. This rule is intended to be used during quickstart builds and allows to scan multiple log files for errors. The rule is enabled by annotating a test method with the LogFileRuleConfig annotation. If enabled, the log files are scanned before the test method is executed. Errors are reported in the rule and can be accessed in the test using getErrors(). See the LogFileRuleConfig for the various configuration options.
    See Also:
    LogFileRuleConfig
    • Constructor Detail

      • LogFileRule

        public LogFileRule()
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement baseStatement,
                                                       org.junit.runners.model.FrameworkMethod frameworkMethod,
                                                       Object o)
        Specified by:
        apply in interface org.junit.rules.MethodRule
      • setErrors

        public void setErrors​(List<String> errors)
      • getEndMarkerForLogFile

        public String getEndMarkerForLogFile​(String logFileName)