Skip to content
New issue

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

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

Already on GitHub? # to your account

before/after hook templates for common setup teardown code #8

Open
hauner opened this issue Apr 29, 2012 · 2 comments
Open

before/after hook templates for common setup teardown code #8

hauner opened this issue Apr 29, 2012 · 2 comments
Labels

Comments

@hauner
Copy link
Owner

hauner commented Apr 29, 2012

I'm thinking about adding some kind of library to the plugin that contains before/after pair hook scripts for some common setup/teardown code.

for example

  • before/after for grails integration test setup/teardown for controllers (i.e. mock request/response etc.)
  • before/after for handling shiro test setup/teardown
  • before/after to rollback the transaction after a scenario (enabled by default..)

Not yet sure how one would use it.

  • by running the pre-defined scripts manually (would be a simple one liner in a glue code script).
  • or by providing a mixin with some setup methods that will take care of running the scripts
  • or simply by providing the code to add to before/after to enable it

Probably we would like to have some of them depend on cucumber tags.

@mariomelo
Copy link

It'd be nice, but I would try to avoid tight dependencies on other plugins like Shiro. It may turn the cucumber plugin too much unstable like "I upgraded the shiro plugin and it doesn't work anymore".

Anyway, the functional-tests plugin does it in a very nice way using one-liners, but mixins would also be great.

@nwittstruck
Copy link

That would be helpful. I am not sure if this would couple this plugin too closely to Geb, but it would also be nice to have some kind of common step implementations. I think there are quite a few things (filling out forms, navigating links, building test data) that everyone needs,

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

No branches or pull requests

3 participants