gherkin - Java Cucumber Step Definition for vertical DataTable -
gherkin - Java Cucumber Step Definition for vertical DataTable -
i'm using cucumber-jvm. have next in .feature file:
background: given next business relationship file line: | first name | lance | | lastly name | fisher | | corporate name | |
this vertically-oriented table. next generated step definition uses first name , lance headers, first name, lastly name, , corporate name should headers.
@given("^the next business relationship file line:$") public void the_following_account_file_line(datatable arg1) throws throwable { // express regexp above code wish had // automatic conversion, alter datatable list<yourtype> throw new pendingexception(); }
how implement step definition handle vertical table rather horizontal table?
it's simple enough, datatable can homecoming array of arrays of strings, , can step through in whatever manner wish.
however, i'd agree prakash murthy horizontal table more usual , useable.
cucumber gherkin cucumber-jvm
Comments
Post a Comment