grails-cucumber
grails-cucumber copied to clipboard
before/after hook templates for common setup teardown code
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.
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.
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,