Can we call one scenario inside another scenario in cucumber? -
i started working behavior driven tool cucumber. fun tool use. while working on problem. came across of time, not reusing code.
that's why want call scenario scenario. have searched found nothing helpful. can ?
another same question posted here on github
this may you're looking for: https://github.com/cucumber/cucumber/wiki/calling-steps-from-step-definitions
so there couple of things can do. if have step want reuse following:
given /^i log in (.*)$/ |name| # ... end
you can call within step so:
given /^(.*) logged in$/ |name| step "i log in #{name}" end
you can following within step definition:
steps %q{ given log in #{name} }
Comments
Post a Comment