Configuring WDIO

Make sure your wdio.conf file has the following:

capabilities: [
{
maxInstances: 5,
// For iOS
platformName: "iOS",
deviceName: "iPhone X",
automationName: "XCUITest",
platformVersion: "11.4",
app: path.resolve("PATH TO YOUR APP.app")
// For Android
platformName: "Android",
deviceName: "Pixel 2",
app: path.resolve("PATH TO YOUR APP.apk")
// For Web - Firefox
browserName: "firefox", 
"moz:firefoxOptions": {
  "args":["-headless"]
  }
// For Web - Chromium
// to run from docker, run this on the host: xhost +
browserName: "chrome",
chromeOptions: {
  args:['--no-sandbox']
  }
}
],
specs: ["./test/features/**/*.feature"],
framework: "cucumber",
reporters: ["junit"],
reporterOptions: {
junit: {
outputDir: "./build/test/reports"
}
},
cucumberOpts: {
require: ["./build/test/**/*.js"], 
backtrace: false,
compiler: [], 
dryRun: false,
failFast: false,
format: ["pretty"],
colors: true,
snippets: true,
source: true,
profile: [], 
strict: false,
tags: [],
timeout: 10000, // <number> timeout for step definitions
ignoreUndefinedDefinitions: false
},
screenshotPath: "./errorShots/",

logLevel: "error"


Comments