Skip to content

Instantly share code, notes, and snippets.

@klamping
Created June 10, 2016 02:13
Show Gist options
  • Save klamping/201062a6c1e7960501ffb026ab98c9ef to your computer and use it in GitHub Desktop.
Save klamping/201062a6c1e7960501ffb026ab98c9ef to your computer and use it in GitHub Desktop.
Hook and retries
module.exports = {
//
// Framework to run your tests with.
framework: "mocha",
//
// Options to be passed to Mocha.
// See the full list at http://mochajs.org/
mochaOpts: {
ui: "bdd",
timeout: 270000,
retries: "3"
},
//
// =====
// Hooks
// =====
// Run functions before or after the test. If one of them returns with a promise, WebdriverIO
// will wait until that promise got resolved to continue.
// see also: http://webdriver.io/guide/testrunner/hooks.html
//
// Gets executed after all tests are done. You still have access to all global variables from
// the test.
after: function(failures, pid) {
if (nconf.get("reporter") === "xunit") {
console.log("Tests complete. Check \"reports\" directory for generated XML file.");
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment