-
Notifications
You must be signed in to change notification settings - Fork 3
Core components
Sprimber is more like orchestrator that allow to execute test scenarios that consists from steps. By this, Sprimber engine doesn't relate to any BDD specific implementation like Cucumber or JBehave. So, below will be listed Sprimber engine components.
This is a cumulative definition of steps, hooks or something else. So, anything that will make something by the needs of BDD specification is an action in terms of Sprimber.
public class ActionDefinition {
private String actionText;
private ActionType actionType;
private MetaInfo metaInfo;
private Method method;
}
For example for @Given('customer is ready')
will be created ActionDefinition
instance with actionText customer is ready
, actionType Given
and corresponding Java Method.
public interface ActionDefinitionLoader {
List<ActionDefinition> load();
}
This interface have one method that allow to load all available action definitions. By default this operation happens at the startup of application and doesn't required during runtime. Next this action definitions will be used to find the corresponding Java method and it execution.
public class TestCase {
private List<ActionDefinition> beforeActions = new ArrayList<>();
private List<ActionDefinition> afterActions = new ArrayList<>();
private List<TestStep> steps = new ArrayList<>();
private List<String> tags = new ArrayList<>();
/**
* Equivalent to scenario name/description
*/
private String name;
/**
* Equivalent to feature/story name
*/
private String parentName;
/**
* Equivalent to feature/story description
*/
private String description;
/**
* Each scenario tagged with unique id for current execution
* The value can be tracked by core of Sprimber but initialization must happen
* at the bridge implementation side.
*/
private String runtimeId;
}
public interface ResourceProcessor {
List<TestCase> process();
}