Data-Driven Testing in Protractor

前端 未结 5 1120
南笙
南笙 2020-12-11 07:28

I am new to protractor. Can anyone please guide me for data driven testing using protractor. Below is the code, config file and testdata.json file.

\'use st         


        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 08:18

    I think your approach is quite reasonable. The reason you are getting undefined is because you put data in the 'done' parameter. It is setting data to the 'done' object that is passed when the 'it' function calls the function you are defining.

    testData.forEach(function (data) { it("data.description", function (data) {

    should be

    testData.forEach(function (data) { it("data.description", function () {

提交回复
热议问题