Class NoOpDDTestSuite

java.lang.Object
datadog.trace.api.civisibility.noop.NoOpDDTestSuite
All Implemented Interfaces:
DDTestSuite

public class NoOpDDTestSuite extends Object implements DDTestSuite
  • Constructor Details

    • NoOpDDTestSuite

      public NoOpDDTestSuite()
  • Method Details

    • setTag

      public void setTag(String key, Object value)
      Description copied from interface: DDTestSuite
      Adds an arbitrary tag to the suite
      Specified by:
      setTag in interface DDTestSuite
      Parameters:
      key - The name of the tag
      value - The value of the tag
    • setErrorInfo

      public void setErrorInfo(Throwable error)
      Description copied from interface: DDTestSuite
      Marks the suite as failed.

      This method should be used to signal a failure that is not related to a specific test case, but rather to the suite as a whole (e.g. a failure in a setup/teardown method whose scope is entire suite). If an individual test case in the suite fails, there is no need to explicitly signal it to the suite object: the status of the suite will reflect individual test case failures automatically.

      This does not imply the end of suite execution, so DDTestSuite.end(Long) method has to be invoked at some point after this one.

      Specified by:
      setErrorInfo in interface DDTestSuite
      Parameters:
      error - Optional exception that caused the suite to fail
    • setSkipReason

      public void setSkipReason(String skipReason)
      Description copied from interface: DDTestSuite
      Marks the suite as skipped.

      This does not imply the end of suite execution, so DDTestSuite.end(Long) method has to be invoked at some point after this one.

      Specified by:
      setSkipReason in interface DDTestSuite
      Parameters:
      skipReason - Optional reason for skipping the suite
    • end

      public void end(@Nullable Long endTime)
      Description copied from interface: DDTestSuite
      Marks the end of suite execution.

      Unless either DDTestSuite.setErrorInfo(Throwable) or DDTestSuite.setSkipReason(String) were invoked prior to calling this method, the status of the suite will be calculated based on the statuses of individual test cases that were executed in scope of the suite.

      The method must be called once for each suite instance.

      The call has to be made in the same thread where the suite was started.

      Specified by:
      end in interface DDTestSuite
      Parameters:
      endTime - Optional finish time in microseconds. If null is supplied, current time will be assumed
    • testStart

      public DDTest testStart(String testName, @Nullable Method testMethod, @Nullable Long startTime)
      Description copied from interface: DDTestSuite
      Marks the start of a new test case in the suite.
      Specified by:
      testStart in interface DDTestSuite
      Parameters:
      testName - The name of the test case
      testMethod - Optional method that corresponds to the test case
      startTime - Optional start time in microseconds. If null is supplied, current time will be assumed
      Returns:
      Handle to the test case instance