Reputation: 299
I'm working in the implementation of cucumber with protractor and everything seems ok because is not failing but when I execute the termal said the 0 scenarios executed.
This is my conf.js:
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
'browserName': 'firefox'
},
specs: './features/login.feature',
onPrepare: function(){
browser.driver.manage().window().maximize()
browser.get('http:www.google.com')
},
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
},
cucumberOpts: {
require: 'features/steps/my_steps.js',
}
};
this is the tree of my framework:
but when I execute protractor conf.js
I have this output in terminal:
[17:27:45] I/launcher - Running 1 instances of WebDriver
[17:27:45] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
0 scenarios
0 steps
0m00.000s
So I just want to know if I had something wrong on the conf.js or there is another command that I should execute to run the features file with protractor.
Hope you can help me.
Upvotes: 0
Views: 1218
Reputation: 2375
It depends on how you configured the running of the conf.js
file. For example.
root
|
|_features
|_config
| |_conf.js
|_package.json
If you are having a script in the package json that triggers protractor from the root of your project that is triggered with for example npm test
from the root of you project, Protractor will then search files from root/{config.specs}
If you are running a script from for example the ./config
-folder then it will search from the root/config/{config.specs}
.
So it depends from where you trigger you script in searching the feature-files
Upvotes: 1