1

I am trying to write a cucumber feature file using data tables. The object that I need to form using the dataTable has a field which requires two fields. Example:

             | Name                | Owner    | Properties.Key | Properties.value  |
             | Name1               | myself   | someKey1       | someValue1        |                             
             | Name2               | robins   | someKey2       | someValue2        |

I was wondering if instead of writing it this way, if there's a better way to write the nested objects using dataTables. Something more like SpecFLow. Example:

          | Name                | Owner    | Properties |
          | name1               | myself   | {nested}   |
          | name2               | robins   | {nested}   |
            |   key      |      value          |
            |  someKey1  |   someValue1        |
            |  someKey2  |   someValue2        |

Or is there any other way to make the nested dataTable??

Also, how will the steps for the table will look like in java?

shelholmes221
  • 518
  • 1
  • 7
  • 18
  • 2
    This answer is related to SpecFlow, which is cucumber for .NET, but it is essentially the same question: [SpecFlow and complex objects](https://stackoverflow.com/q/5788964/3092298). Basically, this is not how gherkin was designed to be used, and you need to split it into multiple steps instead. – Greg Burghardt Sep 13 '19 at 16:16

0 Answers0