Reputation: 11628
I have a bunch of e2e tests for my AngularJS web app. This is my current protractor.config.js file:
// __dirname retuns a path of this particular config file
// assuming that protractor.conf.js is in the root of the project
var basePath = __dirname;
exports.config = {
specs: [
"./Pages/ChartPicker/*.feature",
"./Pages/Chart/*.feature"
],
capabilities: {
"browserName": "chrome"
},
framework : "cucumber",
getPageTimeout : 20000,
allScriptsTimeout : 25000,
params: {
env : "env-not-set",
"env-dev" : {
baseUrl : "http://localhost:9001/"
},
"env-stage" : {
baseUrl : "http://localhost:9020/"
}
},
onPrepare: function () {
// "relativePath" - path, relative to "basePath" variable
global.requirePO = function (relativePath) {
return require(basePath + '\\PageObjects\\' + relativePath + '.po.js');
};
global.requireHelper = function (relativePath) {
return require(basePath + '\\UtilityJS\\' + relativePath + '.js');
};
}
};
How can I exclude one or more tests included in the .feature files?
Upvotes: 3
Views: 2726
Reputation: 2954
In our protractor tests we use the xit functionality:
xit('should test something', function() {
}).pend('Will be implemented later');
This pends the test until you are ready, however we are using jasmine2 so I'm wondering if this functionality is available to you? As far as I know you cannot exclude tests in the config file specifically - only by hiving off the tests to a don't test directory and not including that in your config.
Upvotes: 3