protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Feature request: exclude tests when passing in specs option

Open teddyhwang opened this issue 12 years ago • 4 comments

I think this is a useful feature. I believe Karma has an exclude option in their config to ignore certain files.

The primary reason for this request on my end is that I want to separate the tests and run them in parallel to help reduce the overall E2E test time.

Something like this on the CLI would be extremely helpful:

protractor --specs specs/*.js --exclude specs/anotherTest.js protractorConfig.js

And then simply another exclude option for the config.

I can explore doing a PR if this would be accepted but wanted to see if it would even make it in to Protractor.

Thanks for the amazing tool!

teddyhwang avatar Jan 28 '14 14:01 teddyhwang

Good request - PRs welcome!

juliemr avatar Jan 28 '14 16:01 juliemr

I work with Teddy, and took this one off his plate.

This is my first pull request submission, please let me know if anything is missing or needs tweaking.

https://github.com/angular/protractor/pull/472

zerofifteen-zz avatar Jan 29 '14 16:01 zerofifteen-zz

Why not reuse specs and simply pass in a !prefixed file name to do the exclusions instead of having another config option? --specs 'specs/*.js,!specs/anotherTest.js' This is how Grunt handles this grunt

eddiemonge avatar Jan 29 '14 23:01 eddiemonge

That works as well - I was hesitant to follow the Grunt style and be more consistent with Karma as part of the overall angular style guide. I think either of these patches would be useful.

teddyhwang avatar Jan 30 '14 18:01 teddyhwang