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

Report failure in beforeStartHook #38

Merged
merged 4 commits into from
Feb 4, 2017
Merged

Report failure in beforeStartHook #38

merged 4 commits into from
Feb 4, 2017

Conversation

brentleyjones
Copy link
Collaborator

Currently an assertion failure in any of the hooks will throw an exception and not report a test failure. This change makes them all report test failures (except after finish, which I'll speak to).

Of importance is that if the beforeStartHook fails it will fail all of the scenarios. This is useful since you will normally setup preconditions needed for the rest of your tests in that hook.

The afterFinishHook is not handled the same way, for a couple reasons:

  • It's after all of your scenarios, so if they all passed we don't want a test failure
  • I don't know what to do if you have a failure there. Not crashing would probably be nice. I don't use this feature though, so I'm not the best one to ask

Prevents duplicate code execution between background and main scenario step execution. Will also make future commits nicer.
Also fail all scenarios if failing in beforeStartHook
@Ahmed-Ali
Copy link
Owner

Hi @brentleyjones
Thanks a lot for your amazing contributions!
I am a bit late in my responses these days (I might remain busy to the end of January).
Once I am able to get more free time, I will check them all one by one and do my best to get all the PRs merged and resolve all the recently opened issues.
Cheers

@brentleyjones
Copy link
Collaborator Author

No problem. Have a good holiday if you are celebrating. We can work with forks for a while.

@Ahmed-Ali
Copy link
Owner

Thanks Brentley!

@brentleyjones
Copy link
Collaborator Author

@Ahmed-Ali Just checking in on this.

@Ahmed-Ali Ahmed-Ali merged commit 8ab0f10 into Ahmed-Ali:develop Feb 4, 2017
@Ahmed-Ali
Copy link
Owner

Thanks a lot @brentleyjones for your support and apologizes for the late merge!

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

Successfully merging this pull request may close these issues.

2 participants