Package org.citrusframework.actions
Class InputAction
java.lang.Object
org.citrusframework.actions.AbstractTestAction
org.citrusframework.actions.InputAction
- All Implemented Interfaces:
Described,Named,TestAction,TestActorAware
Test action prompts user data from standard input stream. The input data is then stored as new
test variable. Test workflow stops until user input is complete.
Action can declare a set of valid answers, so user will be prompted until a valid
answer was returned.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.citrusframework.actions.AbstractTestAction
description -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoExecute(TestContext context) Subclasses may add custom execution logic here.protected BufferedReaderProvides input stream reader from system in standard input stream.Gets the message.Gets the validAnswers.Gets the variable.Methods inherited from class org.citrusframework.actions.AbstractTestAction
execute, getActor, getDescription, getName, isDisabled, setActor, setDescription, setName
-
Field Details
-
ANSWER_SEPARATOR
Separates valid answer possibilities- See Also:
-
-
Constructor Details
-
InputAction
Default constructor.
-
-
Method Details
-
doExecute
Description copied from class:AbstractTestActionSubclasses may add custom execution logic here.- Specified by:
doExecutein classAbstractTestAction
-
getInputReader
Provides input stream reader from system in standard input stream.- Returns:
-
getMessage
Gets the message.- Returns:
- the message
-
getVariable
Gets the variable.- Returns:
- the variable
-
getValidAnswers
Gets the validAnswers.- Returns:
- the validAnswers
-