Currently there is not easy way to run all specs from all sub-directories, e.g.
specs/spec.js
specs/feature1/spec.js
Glob pattern implementation in Protractor doesn't have the recursive option so there is no straight-forward way to select all specs under the /specs directory and all sub-directories. There are 2 options:
There should be an easy way to tell Protractor to run all tests under the /specs directory.
Hi @finspin! Thanks for submitting an issue.
Have you tried specs: ['spec/**/*.js']. This is already implemented.
Closing this issue.
Hi @cnishina, this will not work with directory structure as follows:
The ** search is not recursive.
@cnishina @juliemr could you elaborate if you plan to support the above directory structure?
** search is indeed recursive, we use glob for this. See their documentation at https://www.npmjs.com/package/glob
var spec_files = "src/app/**/*.specs.js";
exports.config = {
specs: [spec_files],
};
var spec_files = "src/app/**/*.specs.js";
exports.config = {
specs: [spec_files],
}
above statement doesn't work for me
Most helpful comment
Hi @finspin! Thanks for submitting an issue.
Have you tried
specs: ['spec/**/*.js']. This is already implemented.Closing this issue.