How to run all testcase of a file from other test file in nightwatch
Asked 07 September, 2021
Viewed 1.6K times
  • 59
Votes

I am trying to run a testfile which has multiple testcase inside it from another test file. let's say, i have admin-registration.js test file which has multiple testcase in it. I have to run all the testcase of admin-registration.js from another testfile called main.js.

I am trying to do this in this way, but not able to do:

main.js


const testFiles = require('../tests/admin-registration');

module.exports = {
    "testcase1":testFiles
}

Although i am able to run one testcase of testFiles by specifying name with dot(.) sign. But I have to run all the test case of testFiles.

1 Answer