Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Suppose I have 10 spec files all are named *********.test.js, I want to run my tests on all 9 files except the file Idontwantyou.test.js.

Currently I am finding my spec files in my config.file with:

specs: ['*.test.js'] - this will run all 10 files.

How do I make it run all the 9 test files but skip the Idontwantyou.test.js?

like image 813
Darkbound Avatar asked Aug 27 '15 10:08

Darkbound


Video Answer


1 Answers

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".

like image 101
giri-sh Avatar answered Oct 14 '22 00:10

giri-sh