Class TestResultRecorder

java.lang.Object
com.softicar.gradle.test.logger.plugin.test.result.TestResultRecorder

public class TestResultRecorder extends Object
Accumulates results of test method executions.
  • Constructor Details

    • TestResultRecorder

      public TestResultRecorder()
  • Method Details

    • recordResult

      public void recordResult(org.gradle.api.tasks.testing.TestDescriptor descriptor, org.gradle.api.tasks.testing.TestResult result)
      Records the given TestResult for a specific test method, identified via the given TestDescriptor.

      If invoked several times per test method, the most recently-recorded result will prevail.

      Parameters:
      descriptor - the descriptor that identifies the test method (never null)
      result - the result of the test method run (never null)
    • getFailures

      public Collection<TestFailure> getFailures()
      Retrieves TestFailure instances from the recorded test results.

      If a failure and a subsequent success were recorded for a given test method, the returned Collection will not contain a TestFailure instance for that test method.

      Returns:
      the relevant recorded TestFailure instances (never null)
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()