How can we use multiple csv files in one spec file using Taiko+Gauge

212 Views Asked by At

I am getting error when I declare different csv files according to test data to different scenarios on specs level while using Taiko + Gauge.

Any one can help on this?

Reference: specs with multiple csv files

eg. table:specs/case_sclm.csv

  • Verify test method1

table:specs/case_creation_ts_record.csv

  • Verify test method2, Here both the above methods having 2 different csv files passed as arguments with test data.

Error showing is : Multiple data table present, ignoring table

Advance thanks for any leads or help!

Reference : https://github.com/getgauge/gauge/issues/1518#issue-513703584

1

There are 1 best solutions below

0
On

A spec file can have only one table in this form:

table:some/table.csv

because Gauge will use this table for data driven execution

In order to pass tables as arguments, you need to use Table Parameters

In your example try something like this

* Verify test method <table:specs/case_sclm.csv>
* Verify test method <table:specs/case_creation_ts_record.csv>

The same step implementation will receive a Table object with data from respective csv files.