Class LogFileRule
- java.lang.Object
-
- com.adobe.cq.testing.junit.rules.logfile.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 theLogFileRuleConfigannotation. 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 usinggetErrors(). See theLogFileRuleConfigfor the various configuration options.- See Also:
LogFileRuleConfig
-
-
Constructor Summary
Constructors Constructor Description LogFileRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statementapply(org.junit.runners.model.Statement baseStatement, org.junit.runners.model.FrameworkMethod frameworkMethod, Object o)StringgetEndMarkerForLogFile(String logFileName)List<String>getErrors()LogFileRuleConfiggetRuleConfig()voidsetErrors(List<String> errors)
-
-
-
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:
applyin interfaceorg.junit.rules.MethodRule
-
getRuleConfig
public LogFileRuleConfig getRuleConfig()
-
-