Skip to content

Instantly share code, notes, and snippets.

@alfredlucero
Last active September 24, 2019 17:33
Show Gist options
  • Save alfredlucero/4ee280be0e0674048974520b79dc993a to your computer and use it in GitHub Desktop.
Save alfredlucero/4ee280be0e0674048974520b79dc993a to your computer and use it in GitHub Desktop.
wdio base config - STUI to Webdriver SG blog
exports.config = {
// This is our base config with which all others should be merged.
// Specify test files, we ended our Webdriver test files with *.uitest.js to not get mixed up with our unit tests
specs: ["./**/*.uitest.js"],
// Patterns to exclude
exclude: [],
// Group tests for a page in a suite for easier running of groups of page tests in CLI
suites: {
page_suite: ["./path/to/page.uitest.js"]
},
// Commands run in synchronous manner by default
sync: true,
// Number of browser instances to run
maxInstances: 1,
// Capabilities i.e. configuring different types of browser instances
capabilities: [
{
maxInstances: 1,
browserName: "chrome",
}
],
// Save screenshot to a given path if command fails
screenshotPath: "./errorShots/",
// Using Mocha and Mochawesome reporter
reporters: ["mochawesome"],
reporterOptions: {
outputDir: "./reports",
filename: "wdio-results",
},
mochawesomeOpts: {
includeScreenshots: true,
screenshotUseRelativePath: true,
},
mochaOpts: {
ui: "bdd",
timeout: 999999,
compilers: ["js:babel-register"]
},
// Other default configurations already provided from documentation template
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment