Interface AutotestRunner

All Known Implementing Classes:
SelfTest

@TestInstance(PER_CLASS) public interface AutotestRunner
An interface that runs specified actions for stages: beforeAll, beforeEach, tests, afterEach, and afterAll.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
    A logger to record the activity of this object.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.dakusui.actionunit.visitors.ReportingActionPerformer
    Creates a reporting action performer.
    default void
    afterAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
    Performs a given action for afterAll stage and writes a report of the activity to writer
    default void
    afterEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
    Performs a given action for afterEach stage and writes a report of the activity to writer
    default void
    beforeAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
    Performs a given action for beforeAll stage and writes a report of the activity to writer
    default void
    beforeEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
    Performs a given action for beforeEach stage and writes a report of the activity to writer
    static String
    composeResultMessage(Class<? extends AutotestRunner> aClass, String stageName, String testName, boolean succeeded)
    Composes a line in a report.
    default com.github.dakusui.actionunit.io.Writer
    Creates a writer through which action activities are reported.
    default void
    runTestAction(String name, com.github.dakusui.actionunit.core.Action action)
    A template that defines the overall scenario of a test.
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
      A logger to record the activity of this object.
  • Method Details

    • beforeAll

      default void beforeAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
      Performs a given action for beforeAll stage and writes a report of the activity to writer
      Parameters:
      action - An action to be performed as beforeAll stage.
      writer - A writer through which report of the action will be written.
    • beforeEach

      default void beforeEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
      Performs a given action for beforeEach stage and writes a report of the activity to writer
      Parameters:
      action - An action to be performed as beforeEach stage.
      writer - A writer through which report of the action will be written.
    • runTestAction

      @TestTemplate default void runTestAction(String name, com.github.dakusui.actionunit.core.Action action)
      A template that defines the overall scenario of a test.
      Parameters:
      name - A name of a test.
      action - An action executed as a test.
    • afterEach

      default void afterEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
      Performs a given action for afterEach stage and writes a report of the activity to writer
      Parameters:
      action - An action to be performed.
      writer - A writer through which a report is written.
    • afterAll

      default void afterAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer)
      Performs a given action for afterAll stage and writes a report of the activity to writer
      Parameters:
      action - An action to be performed.
      writer - A writer through which a report is written.
    • createWriter

      default com.github.dakusui.actionunit.io.Writer createWriter(List<String> out)
      Creates a writer through which action activities are reported.
      Parameters:
      out - A list to which a copy of the report is appended.
      Returns:
      A writer through which action report is written.
    • actionPerformer

      com.github.dakusui.actionunit.visitors.ReportingActionPerformer actionPerformer()
      Creates a reporting action performer. A class of reporting action performers is defined in actionunit library.
      Returns:
      A reporting action performer.
    • composeResultMessage

      static String composeResultMessage(Class<? extends AutotestRunner> aClass, String stageName, String testName, boolean succeeded)
      Composes a line in a report.
      Parameters:
      aClass - A test class.
      stageName - A name of a stage such as beforeAll, beforeEach.
      testName - A name of a test.
      succeeded - true - succeeded / false - otherwise.
      Returns:
      A composed result message.