You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi All
When I run my feature file, suppose it is having 10 test cases and in between if one gets failed, then the browser does not get closed on its own.
Need to know how to close the browser on failure of test case, as the next test case runs over it and hence gets failed.
This is the nightwatch.conf.js which i am using------>
Kindly help me over this. Thanks
Hi All
When I run my feature file, suppose it is having 10 test cases and in between if one gets failed, then the browser does not get closed on its own.
Need to know how to close the browser on failure of test case, as the next test case runs over it and hence gets failed.
This is the nightwatch.conf.js which i am using------>
Kindly help me over this. Thanks
const seleniumServer = require('selenium-server');
const chromedriver = require('chromedriver');
const geckodriver = require('geckodriver');
var reporter = require('cucumber-html-reporter');
require('nightwatch-cucumber')({
// nightwatchOutput: false,
cucumberArgs: ['--require', 'step-definitions',
'--require', 'step-definitions/hooks.js',
'--format', 'node_modules/cucumber-pretty',
'--format', 'json:reports/cucumber.json',
'features'
]
});
module.exports = {
"test_workers": {
"enabled": true,
"workers": "auto"
},
output_folder: 'reports',
custom_assertions_path: '',
live_output: false,
disable_colors: false,
selenium: {
start_process: true,
server_path: seleniumServer.path,
log_path: '',
host: '127.0.0.1',
port: 4444
},
test_settings: {
default: {
launch_url: 'http://localhost:8087',
selenium_port: 4444,
selenium_host: '127.0.0.1',
screenshots: {
enabled: true,
on_failure: true,
path: 'reports/screenshots'
},
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
chromeOptions: {
// args: ['incognito', 'headless', 'no-sandbox', 'disable-gpu']
}
},
end_session_on_fail: true,
"skip_testcases_on_fail": false,
detailed_output: true,
},
}
};
var options = {
theme: 'bootstrap',
jsonFile: 'reports/cucumber.json',
output: 'reports/cucumber_reports.html',
// output: 'reports/output_JUnit.xml',
reportSuiteAsScenarios: true,
launchReport: true,
metadata: {
"App Version": "0.3.2",
"Test Environment": "Demo",
"Browser": "Chrome 54.0.2840.98",
"Platform": "Windows 7",
"Parallel": "Scenarios",
"Executed": "Local"
}
};
reporter.generate(options);
The text was updated successfully, but these errors were encountered: