Class OutputValidator

java.lang.Object
org.apache.maven.surefire.its.fixture.OutputValidator
Direct Known Subclasses:
FailsafeOutputValidator

public class OutputValidator extends Object
A specialized verifier that enforces a standard use case for surefire IT's
Author:
Kristian Rosenvold
  • Constructor Details

    • OutputValidator

      public OutputValidator(org.apache.maven.it.Verifier verifier)
  • Method Details

    • verifyTextInLog

      public OutputValidator verifyTextInLog(String text)
    • verifyErrorFreeLog

      public OutputValidator verifyErrorFreeLog()
    • verifyErrorFree

      public OutputValidator verifyErrorFree(int total)
    • 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

      public List<String> loadLogLines() throws org.apache.maven.it.VerificationException
      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

      public List<String> loadFile(File file, Charset charset)
    • getBasedir

      public String getBasedir()
    • getSubFile

      public File getSubFile(String path)
      Returns a file, referenced from the extracted root (where pom.xml is located)
      Parameters:
      path - The subdirectory under basedir
      Returns:
      A file
    • assertTestSuiteResults

      public OutputValidator assertTestSuiteResults(int total, int errors, int failures, int skipped)
    • assertTestSuiteResults

      public OutputValidator assertTestSuiteResults(int total, int errors, int failures, int skipped, int flakes)
    • assertTestSuiteResults

      public OutputValidator assertTestSuiteResults(int total)
    • assertIntegrationTestSuiteResults

      public OutputValidator assertIntegrationTestSuiteResults(int total, int errors, int failures, int skipped)
    • assertIntegrationTestSuiteResults

      public OutputValidator assertIntegrationTestSuiteResults(int total)
    • getTargetFile

      public TestFile getTargetFile(String modulePath, String fileName)
    • getTargetFile

      public TestFile getTargetFile(String fileName)
    • getSurefireReportsFile

      public TestFile getSurefireReportsFile(String fileName, Charset charset)
    • getSurefireReportsFile

      public TestFile getSurefireReportsFile(String fileName)
    • getSurefireReportsXmlFile

      public TestFile getSurefireReportsXmlFile(String fileName)
    • getSurefireReportsDirectory

      public File getSurefireReportsDirectory()
    • getSiteFile

      public TestFile getSiteFile(String fileName)
    • getBaseDir

      public File 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