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
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.LoggerA logger to record the activity of this object. -
Method Summary
Modifier and TypeMethodDescriptioncom.github.dakusui.actionunit.visitors.ReportingActionPerformerCreates a reporting action performer.default voidafterAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer) Performs a givenactionfor afterAll stage and writes a report of the activity towriterdefault voidafterEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer) Performs a givenactionfor afterEach stage and writes a report of the activity towriterdefault voidbeforeAll(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer) Performs a givenactionfor beforeAll stage and writes a report of the activity towriterdefault voidbeforeEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer) Performs a givenactionfor beforeEach stage and writes a report of the activity towriterstatic StringcomposeResultMessage(Class<? extends AutotestRunner> aClass, String stageName, String testName, boolean succeeded) Composes a line in a report.default com.github.dakusui.actionunit.io.WritercreateWriter(List<String> out) Creates a writer through which action activities are reported.default voidrunTestAction(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 LOGGERA 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 givenactionfor beforeAll stage and writes a report of the activity towriter- Parameters:
action- An action to be performed asbeforeAllstage.writer- A writer through which report of theactionwill be written.
-
beforeEach
default void beforeEach(com.github.dakusui.actionunit.core.Action action, com.github.dakusui.actionunit.io.Writer writer) Performs a givenactionfor beforeEach stage and writes a report of the activity towriter- Parameters:
action- An action to be performed asbeforeEachstage.writer- A writer through which report of theactionwill 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 givenactionfor afterEach stage and writes a report of the activity towriter- 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 givenactionfor afterAll stage and writes a report of the activity towriter- Parameters:
action- An action to be performed.writer- A writer through which a report is written.
-
createWriter
-
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 asbeforeAll,beforeEach.testName- A name of a test.succeeded-true- succeeded /false- otherwise.- Returns:
- A composed result message.
-