Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including use cases #2

Closed
bertilmuth opened this issue May 8, 2017 · 5 comments
Closed

Including use cases #2

bertilmuth opened this issue May 8, 2017 · 5 comments
Assignees
Milestone

Comments

@bertilmuth
Copy link
Owner

bertilmuth commented May 8, 2017

Right now, requirementsascode does not allow to include other use cases from a use case.
Including use cases makes it possible to reuse steps from other use cases.
It avoids error prone duplication of steps between use cases.

R1. The solution shall allow to include whole use cases, with all of their flows. For this, a new .includeUseCase statement shall be created.
R2. Including shall be possible from any place in a flow where a step definition is possible.
R3a. When the runner reaches an .includeUseCase statement, the runner shall continue with the first step of the basic flow of the included flow, with the exception that an alternative flow of the included use case may interrupt.
R3b. When the last step of an included flow has been run, the runner shall continue with the next step of the including flow (after the .includeUseCase statement).

@bertilmuth bertilmuth added this to the v0.5.0 milestone May 8, 2017
@bertilmuth
Copy link
Owner Author

bertilmuth commented May 9, 2017

Dear watchers, and all: what do you think? Does that make sense? Please take a moment and respond.

bertilmuth added a commit that referenced this issue May 11, 2017
bertilmuth added a commit that referenced this issue May 11, 2017
Preparatory refactor for #2
bertilmuth added a commit that referenced this issue May 11, 2017
Preparatory refactor for #2
bertilmuth added a commit that referenced this issue May 11, 2017
@bertilmuth
Copy link
Owner Author

No comments so far. I guess I will just implement it, then.

@bertilmuth
Copy link
Owner Author

You can find an example test case here.

@bertilmuth
Copy link
Owner Author

Changed requirement R3b, to continue the including flow when ANY included flow ends. That seems to me more intuitive than continuing only when an included basic flow ends.

I have implemented in the changed version already. So far, it only works for a single level of nesting. So including use cases that include use cases does not work yet. That will be the next step.

@bertilmuth
Copy link
Owner Author

Implemented as specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant