Protractor - How to exclude spec file in the config file? Protractor - How to exclude spec file in the config file? selenium selenium

Protractor - How to exclude spec file in the config file?


You can exclude the spec's by adding them in the exclude tag in you conf.js file. You can also add patterns to exclude many test scripts with similar names. Here's how to do it -

exclude: ['Idontwantyou.test.js'],

More info can be found here. Hope this helps. If that link is broken, search the config file for "exclude".


As Grish suggested you can use exclude . As per the comment of Darkbound the exact location is given below .Modify the config.js as per below .

In here in specs: I mentioned the src/com/sam/scriptjs/ExcelTest.js but since I specifically excluded it , it won;t get picked .

exports.config = {  framework: 'jasmine',    multiCapabilities: [{          'browserName': 'firefox'        }, {          'browserName': 'chrome'        }],  seleniumAddress: 'http://localhost:4444/wd/hub',  exclude: ['src/com/sam/scriptjs/winstonlogs.spec.js','src/com/sam/scriptjs/ExcelTest.js'],  specs: ['src/com/sam/scriptjs/nonangularstackscript.spec.js','src/com/sam/scriptjs/radiobutton.spec.js','src/com/sam/scriptjs/ExcelTest.js']}