I am working in protractor-cucumber framework.In our requirement,one section is common in all part.Let say creating a post in 10 locations.So how can i reuse the scenario of creating post, so that it can be reuse in all locations.Do we have any way to reuse a scenario in cucumber.
Asked
Active
Viewed 709 times
0
-
Possible duplicate of [Is it possible to reuse a feature as the "Given" for another feature?](https://stackoverflow.com/questions/10812758/is-it-possible-to-reuse-a-feature-as-the-given-for-another-feature) – Todd A. Jacobs Aug 27 '18 at 19:09
-
As [previously answered](https://stackoverflow.com/a/10813061/1301972), you can reuse steps but not scenarios. – Todd A. Jacobs Aug 27 '18 at 19:10
-
Create a step that does what the scenarios do - use that step as a Given to set up the scenarios. Either that, or you make it a hook, and exclude it from the test of that functionality – KyleFairns Aug 28 '18 at 09:50