I have a feature with a background section which takes multiple minutes; it's setting up state on a remote system via an API. I'd like to have it execute only once for all the scenarios which follow, instead of executing for every scenario. My scenarios don't change any state, they're read-only so there should be no side-effects from one scenario to another.
I'm not using rails, and don't have a local database, so can't do stuff with database transactions.
I'm currently thinking to do something with Before in env.rb and have some conditional code based on an implicit convention/meaning for tags, e.g. "@background-only-once", could make some custom code skip the steps, or it could execute different logic in the step-definitions – but it's a bit nasty to try to share this across executions.
Thoughts?