Monday, March 29, 2021

BDD Cucumber -resequencing the feature file and scenarios

 Hey Folks,

There may be a situation while you need to call your scenario outline of one feature needs to call in particular sequence based on application flow, this can be achieved by adding the tags to scenario outline with priority will work.

However, what happens when you need to sequence your scenario outline with different feature files? 

By default, BDD cucumber takes feature names alphabetically during the execution and then based on your tag sequences. So, if you want to resequencing your scenario in different features file, then you need to give your feature names in sequence of alphabet or append some numbering. if it still doesn't work then rename the feature file name itself and it will work. for example,

Feature file name : 01Feature1.feature, 02Feature2.feature

Feature Name: 01Feature1, 02 Feature2

Cheers,

TJ


No comments:

Post a Comment