0

I have a list with: (converted to a list after reading a .feature file)

Given Device unit of measure is set to value "<uom>"

And Device is set to value "Disabled"

And Device is set to value "<time>"

 Examples:

    | time | uom |

    | 1    | kpa |

    | 2    | kpa |

    | 3    | kpa |

    | 4    | kpa |

    | 5    | kpa |

    | 10   | kpa |

    | 15   | kpa |

    | 30   | kpa |

    | 60   | kpa |

    | 90   | kpa |

I am trying to convert it to:

Iteration 1:

Given Device unit of measure is set to value "kpa"

And Device is set to value "Disabled"

And Device is set to value "1"

Iteration 2:

Given Device unit of measure is set to value "kpa"

And Device is set to value "Disabled"

And Device is set to value "2"

and so on... Should have 10 iterations at the end with each of the value substituted.

I know when running behave tests, behave does this for you, but I am trying to get these steps stored in a database for future reference.

Question is how can I convert the gherkin steps to the iterations I have shown above, using python?

Thanks for your help!

vay
  • 65
  • 1
  • 7

1 Answers1

0

Found a solution. basically broke it apart piece by piece.

parsing the scenario/scenario outline parsing the examples Piecing back together the steps

vay
  • 65
  • 1
  • 7