1

I have a test file which tests an application using data from other js file. When I want to test with other data I have to copy the first test, rename it to test2 and then use second js file.

Now, I want to have just one test file, which will first take data from js file 1, then after it has done with it, go and take the data from next js file, and do whole test again until there are no more js files.

For example test1:

 var config = require('./configs/config1');

Example 2 (copy test1 and rename to test2):

var config = require('./configs/config2');
Amir
  • 1,328
  • 2
  • 13
  • 27
Losmi
  • 15
  • 1
  • Possible duplicate of [Data-Driven Testing in Protractor](https://stackoverflow.com/questions/38221397/data-driven-testing-in-protractor) – Optimworks Jun 07 '17 at 15:46
  • You need to implement Data Driven Approach. It will fulfill your requirement. You can go thorugh https://stackoverflow.com/questions/38221397/data-driven-testing-in-protractor/38222933#38222933 link and answer by Myself – Optimworks Jun 07 '17 at 15:47

0 Answers0