Class TestMethod

java.lang.Object
org.apache.maven.surefire.junitcore.TestMethod
All Implemented Interfaces:
ConsoleOutputReceiver

class TestMethod extends Object implements ConsoleOutputReceiver
Represents the test-state of a single test method that is run.
Notes about thread safety: This instance is serially confined to 1-3 threads (construction, test-run, reporting), without any actual parallel access
  • Field Details

  • Constructor Details

  • Method Details

    • testFinished

      void testFinished()
    • testIgnored

      void testIgnored(ReportEntry description)
    • testFailure

      void testFailure(ReportEntry failure)
    • testError

      void testError(ReportEntry failure)
    • testAssumption

      void testAssumption(ReportEntry failure)
    • setEndTime

      private void setEndTime()
    • getElapsed

      int getElapsed()
    • getStartTime

      long getStartTime()
    • getEndTime

      long getEndTime()
    • replay

      void replay(RunListener reporter)
    • createReportEntry

      private ReportEntry createReportEntry(ReportEntry reportEntry)
    • attachToThread

      void attachToThread()
    • detachFromCurrentThread

      void detachFromCurrentThread()
    • getThreadTestMethod

      static TestMethod getThreadTestMethod()
    • getLogicalStream

      LogicalStream getLogicalStream()
    • writeTestOutput

      public void writeTestOutput(String output, boolean newLine, boolean stdout)
      Description copied from interface: ConsoleOutputReceiver
      Forwards process output from the running test-case into the reporting system
      Specified by:
      writeTestOutput in interface ConsoleOutputReceiver
      Parameters:
      output - stdout/sterr output from running tests
      newLine - print on new line
      stdout - Indicates if this is stdout
    • getTestSet

      TestSet getTestSet()