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 theLogFileRuleConfig
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 usinggetErrors()
. See theLogFileRuleConfig
for 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.Statement
apply(org.junit.runners.model.Statement baseStatement, org.junit.runners.model.FrameworkMethod frameworkMethod, Object o)
String
getEndMarkerForLogFile(String logFileName)
List<String>
getErrors()
LogFileRuleConfig
getRuleConfig()
void
setErrors(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:
apply
in interfaceorg.junit.rules.MethodRule
-
getRuleConfig
public LogFileRuleConfig getRuleConfig()
-
-