Class OutputValidator
java.lang.Object
org.apache.maven.surefire.its.fixture.OutputValidator
- Direct Known Subclasses:
FailsafeOutputValidator
A specialized verifier that enforces a standard use case for surefire IT's
- Author:
- Kristian Rosenvold
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertIntegrationTestSuiteResults
(int total) assertIntegrationTestSuiteResults
(int total, int errors, int failures, int skipped) assertTestSuiteResults
(int total) assertTestSuiteResults
(int total, int errors, int failures, int skipped) assertTestSuiteResults
(int total, int errors, int failures, int skipped, int flakes) assertThatLogLine
(org.hamcrest.Matcher<String> line, org.hamcrest.Matcher<Integer> nTimes) getSiteFile
(String fileName) String[]
getStringsOrderInLog
(String[] strings) getSubFile
(String path) Returns a file, referenced from the extracted root (where pom.xml is located)getSurefireReportsFile
(String fileName) getSurefireReportsFile
(String fileName, Charset charset) getSurefireReportsXmlFile
(String fileName) getTargetFile
(String fileName) getTargetFile
(String modulePath, String fileName) loadLogLines
(org.hamcrest.Matcher<String> line) boolean
stringsAppearInSpecificOrderInLog
(String[] strings) verifyErrorFree
(int total) verifyTextInLog
(String text)
-
Constructor Details
-
OutputValidator
public OutputValidator(org.apache.maven.it.Verifier verifier)
-
-
Method Details
-
verifyTextInLog
-
verifyErrorFreeLog
-
verifyErrorFree
-
assertThatLogLine
public OutputValidator assertThatLogLine(org.hamcrest.Matcher<String> line, org.hamcrest.Matcher<Integer> nTimes) throws org.apache.maven.it.VerificationException - Throws:
org.apache.maven.it.VerificationException
-
loadLogLines
- Throws:
org.apache.maven.it.VerificationException
-
loadLogLines
public List<String> loadLogLines(org.hamcrest.Matcher<String> line) throws org.apache.maven.it.VerificationException - Throws:
org.apache.maven.it.VerificationException
-
loadFile
-
getBasedir
-
getSubFile
Returns a file, referenced from the extracted root (where pom.xml is located)- Parameters:
path
- The subdirectory under basedir- Returns:
- A file
-
assertTestSuiteResults
-
assertTestSuiteResults
public OutputValidator assertTestSuiteResults(int total, int errors, int failures, int skipped, int flakes) -
assertTestSuiteResults
-
assertIntegrationTestSuiteResults
public OutputValidator assertIntegrationTestSuiteResults(int total, int errors, int failures, int skipped) -
assertIntegrationTestSuiteResults
-
getTargetFile
-
getTargetFile
-
getSurefireReportsFile
-
getSurefireReportsFile
-
getSurefireReportsXmlFile
-
getSurefireReportsDirectory
-
getSiteFile
-
getBaseDir
-
getStringsOrderInLog
public String[] getStringsOrderInLog(String[] strings) throws org.apache.maven.it.VerificationException - Throws:
org.apache.maven.it.VerificationException
-
stringsAppearInSpecificOrderInLog
public boolean stringsAppearInSpecificOrderInLog(String[] strings) throws org.apache.maven.it.VerificationException - Throws:
org.apache.maven.it.VerificationException
-