Specflow > Is there a way to execute some logic before the Scenario but AFTER the Background? -


i have scenario several steps , there's background outline inserts initial data database.

right before scenario block executes want able start transaction. thing is, want transaction start after background has executed, if scenario fails , roll back, initial data inserted in background still there, because want asserts against data.

i have tried decorating method (in begin transaction) [beforescenario] , [beforescenarioblock], fired @ beginning, before background. doesn't work.

any ideas?

i have feeling not possible @ moment. should able add [afterstep] binding called after steps in background , after last step in background work around though.

i can't remember exactly, might have trouble working out step executing though in current version, there stuff in v2 version (which has beta available nuget feed here) gives access scenariostepcontext might that.

this seems reasonable feature though , don't think pull request hooks [beforebackground] , [afterbackground] refused. hint. hint.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -