excelbdd
v1.3.0
Published
conduct BDD by excel files, to replace .feature files in cucumber, support parameterized test by excel files
Downloads
28
Readme
ExcelBDD
Use Excel file as BDD feature file, get example data from excel files, support automation tests
load example data from excel files
var excelbdd = require("excelbdd");
excelFile = "excel file path";
describe("Use ExcelBDD normally", () => {
it.each(excelbdd.getExampleList(excelFile, "FirstSheet", "Scena"))(
"%p",
(HeaderName, p1, p2, p3, p4) => {
console.log(HeaderName, p1, p2, p3, p4);
expect(HeaderName).toMatch("Scena");
}
);
});
load excel sheet as data table into test case, similar to load csv file.
const testcaseListInDatatable1 = ExcelBDD.getExampleTable(excelBDDFile, 'DataTable1', 2);
test.each(testcaseListInDatatable1)(
"%s",
(Header01, Header02, Header03, Header04, Header05, Header06, Header07, Header08
) => {
console.log(Header01, Header02, Header03, Header04, Header05, Header06, Header07, Header08);
});
more information at ExcelBDD Node.js Guideline