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

implemented nested steps #17 (+ text report only) #174

Merged
merged 1 commit into from
Dec 11, 2015

Conversation

albertofaci
Copy link
Contributor

Hello, this is an attempt to support nested steps.

I had to change a few things around ScenarioModelBuilder to keep a stack of steps so we can add a nested step to the right parent and supporting multilevel nesting.

As for the report, I have just done it for the plain text report. Note that the nested steps are for report purposes only, i.e. the step status, duration, attachments, etc, are really kept at the top level only. Otherwise it gets too complicated.
If this is accepted, a separate issue should be created for html5 report maybe with a collapsible widget

@albertofaci
Copy link
Contributor Author

Hiya, any comments or suggestions about this?

@janschaefer
Copy link
Contributor

Hi, sorry, I already worked a bit on it, but did not came very far yet due to lack of time. You can have a look at the new branch nested-steps. I changed a bit the appearence of the console report and I also would like to integrate the correct execution status on the sub steps. I also would like to integrate it into the html report

@janschaefer janschaefer merged commit be2d8ea into TNG:master Dec 11, 2015
@janschaefer
Copy link
Contributor

I slightly adapted your implementation and also took the chance to refactor the method intercepting code. I also changed a bit the way the nested steps are printed. In particular, I believe the fail status should be printed after the nested step that actually failed.

@janschaefer janschaefer added this to the v0.10.0 milestone Dec 11, 2015
@albertofaci
Copy link
Contributor Author

Nice one, thank you, Jan!

As far as I can see the failed status will appear only on the parent top most state.

Current

Given something with nested steps that fails (failed)
 |  Given something
 |  And another thing
 |  And something else that fails
When something happens (skipped)
Then something has happen (skipped)
something else not (skipped)

whereas the following would be desirable?

Given something with nested steps that fails (failed)
 |  Given something (passed)
 |  And another thing (failed)
 |  And something else that fails (skipped)
When something happens (skipped)
Then something has happen (skipped)
something else not (skipped)

@janschaefer
Copy link
Contributor

With the current implementation the parent step will not be shown as failed. But I agree that this makes sense. I will change that.

janschaefer pushed a commit that referenced this pull request Dec 12, 2015
@janschaefer
Copy link
Contributor

I did a first HTML report implementation. Collapsing is still missing though. What do you think?

nested-steps

janschaefer pushed a commit that referenced this pull request Dec 12, 2015
janschaefer pushed a commit that referenced this pull request Dec 12, 2015
@albertofaci
Copy link
Contributor Author

well done, that looks brilliant!

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

Successfully merging this pull request may close these issues.

2 participants