Can I execute only few steps of particular scenario multiple times using cucumber serenity BDD?

31 Views Asked by At

Scenario Outline: Filter_Global_SaveAndAddNew_Cancel_CreateFilterPage

#The first 8 steps have to execute only once

When navigate_To_FilterPage
Then click_on_create_Filter_Group
Then filter_Group_Name "<filterGroupName>"
Then click_Public_Filter_Type
Then filter_Member_Code "<memberCode>"
Then click_AND_FilterGroup_Type
And click_Save_And_Continue
Then click_On_Add_Filters

#Next 5 steps have to execute 4 times

Then filter_Name "<filterName>"
Then select_Operator
Then value "<filterValue>"
Then special_Value "<filterSpecialValue>"
And click_Save

Examples:
  | filterGroupName | memberCode | filterName       | filterValue | filterSpecialValue |
  | TESTFILTER222   | aaaaaaaaaa | XXXXXXXXXXXXXXXX | 4           | 7                  |

Scenario: Filter_Global_SaveAndAddNew_Cancel_CreateFilterPage When navigate_To_FilterPage Then click_on_create_Filter_Group Then filter_Group_Name "" Then click_Public_Filter_Type Then filter_Member_Code "" Then click_AND_FilterGroup_Type And click_Save_And_Continue Then click_On_Add_Filters Examples: | filterGroupName | memberCode | | TESTFILTER222 | aaaaaaaaaa |

Scenario Outline: Filter_Global_SaveAndAddNew_Cancel_CreateFilterPage_iteration
Then filter_Name "<filterName>"
Then select_Operator
Then value "<filterValue>"
Then special_Value "<filterSpecialValue>"
And click_Save

Examples:
  | filterName       | filterValue | filterSpecialValue |
  | XXXXXXXXXXXXXXXX | 4           | 7                  |
  | XXXXXXXXXXXXXXXX | 5           | 6                  |
  | XXXXXXXXXXXXXXXX | 6           | 5                  |
  | XXXXXXXXXXXXXXXX | 7           | 4                  |

Tried like this but not working

0

There are 0 best solutions below