How to exclude a spec file in Protractor?

You can exclude the spec's by adding them in the exclude tag in your conf.js file. You can also add patterns to exclude many test scripts with similar names.

Sometimes we may face a situation of running only few tests out of all. In this case, we use exclude tag in our conf.js file to run only few tests. Say we want to exclude test name "myTest.js", then we need to add this in conf.js

exclude: [myTest.js]