Files
socket.io/wdio.conf.js
Damien Arrachequesne 194a9b762e ci: migrate from zuul to webdriver.io
zuul is now archived [1] and does not support the new W3C WebDriver
protocol, since it relies on the wd package [2] under the hood, which
uses the (now deprecated) JSON Wire Protocol.

We will now use the webdriver.io test framework, which allows to run
our tests in local and on Sauce Labs (cross-browser and mobile tests).
This allows us to run our tests on latest versions of Android and iOS,
since Sauce Labs only supports the W3C WebDriver protocol for these
platforms ([3]).

[1]: https://github.com/defunctzombie/zuul
[2]: https://github.com/admc/wd
[3]: https://docs.saucelabs.com/dev/w3c-webdriver-capabilities/
2022-11-15 10:13:08 +01:00

95 lines
2.1 KiB
JavaScript

const BASE_SAUCE_OPTIONS = {
build: process.env.GITHUB_RUN_ID || "local",
name: "socket.io-parser",
};
const config = {
specs: ["./test/index.js"],
capabilities: [
{
browserName: "chrome",
},
],
maxInstances: 5,
logLevel: "warn",
bail: 0,
baseUrl: "http://localhost",
reporters: ["spec"],
framework: "mocha",
mochaOpts: {
ui: "bdd",
timeout: 60000,
},
};
if (process.env.CI === "true") {
config.services = ["sauce"];
config.user = process.env.SAUCE_USERNAME;
config.key = process.env.SAUCE_ACCESS_KEY;
// https://saucelabs.com/platform/platform-configurator#/
config.capabilities = [
{
browserName: "chrome",
browserVersion: "latest",
platformName: "Windows 11",
"sauce:options": BASE_SAUCE_OPTIONS,
},
{
browserName: "MicrosoftEdge",
browserVersion: "latest",
platformName: "Windows 11",
"sauce:options": BASE_SAUCE_OPTIONS,
},
{
browserName: "firefox",
browserVersion: "latest",
platformName: "Windows 11",
"sauce:options": BASE_SAUCE_OPTIONS,
},
{
browserName: "internet explorer",
browserVersion: "10",
platformName: "Windows 7",
"sauce:options": BASE_SAUCE_OPTIONS,
},
{
browserName: "safari",
browserVersion: "latest",
platformName: "macOS 12",
"sauce:options": BASE_SAUCE_OPTIONS,
},
{
platformName: "Android",
browserName: "Chrome",
"appium:deviceName": "Android GoogleAPI Emulator",
"appium:platformVersion": "latest",
"appium:automationName": "UiAutomator2",
"sauce:options": Object.assign(
{
appiumVersion: "1.22.1",
},
BASE_SAUCE_OPTIONS
),
},
{
platformName: "iOS",
browserName: "Safari",
"appium:deviceName": "iPhone Simulator",
"appium:platformVersion": "latest",
"appium:automationName": "XCUITest",
"sauce:options": Object.assign(
{
appiumVersion: "2.0.0",
},
BASE_SAUCE_OPTIONS
),
},
];
}
exports.config = config;