0

I would like to use steps from one feature file in another feature file with additional steps

feature file 1
secenario outline: sample test
  Given step 1 with id
  then step 2 with name 
  and step 3 with address
|id | name | address|
|1 | rahul | usa |


feature file 2
secenario outline: sample test
  Given step 1 with id
  then step 2 with name 
  when step 3 with id and name and location
  and step 3 with address
|id | name | address| location |
|1 | rahul | usa | hyd|

in practiacal i have more 23 steps to validate in my process. but when it comes to some other client i need to execute some additional steps to validate.

I am not able to skip the steps based on client. so i planned to create new feature file and copy the same steps again. but i have following issue

bheave.step_registry.Ambiguousstep

Please guide me how to resolve the issue

satishsrip
  • 125
  • 3
  • 12
  • if you have multiple variables in the step, why not to use the setup table like you have in step 3 with values for id, name, address and location. Then you can fill in the data you need and reuse the same step for other clients – automationleg Aug 05 '20 at 16:40
  • Clients that have similar conditions can be used via data table, But when it comes where i need to use some conditions that are not similar i need to use different strategy which i am not able to figure it out – satishsrip Aug 24 '20 at 22:42

0 Answers0