Skip to content

Instantly share code, notes, and snippets.

@alfredlucero alfredlucero/wdio.conf.js
Last active Sep 24, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.