Created
November 27, 2017 11:41
-
-
Save hanikhan/f2d95d19d080b468ab1a4cb699823f23 to your computer and use it in GitHub Desktop.
codeceptJS configuration file for BrowserStack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.config={ | |
helpers: { | |
WebDriverIO: { | |
url: process.env.BASE_URL, | |
user: "<USERNAME>", | |
key: "<ACCESS_KEY>", | |
desiredCapabilities: { | |
project: "Sample Project", | |
build: "CodeceptJS", | |
"browserstack.local" : true, | |
os: "Windows", | |
os_version: "10", | |
resolution: "1920x1080", | |
}, | |
uniqueScreenshotNames: true | |
}, | |
Mochawesome: { | |
uniqueScreenshotNames: true | |
} | |
}, | |
include: { | |
"I": "./lib/steps_file.js", | |
HomePage: "./lib/pages/HomePage.js", | |
BannerPage: "./lib/pages/BannerPage.js" | |
}, | |
multiple: { | |
testHomePage: { | |
grep: "@HomePage", | |
browsers: [{"browser": "chrome", "desiredCapabilities": {name: "Home Page"}},{"browser": "firefox", "desiredCapabilities": {name: "Home Page"}}] | |
}, | |
testBannerPage: { | |
grep: "@BannerPage", | |
browsers: [{"browser": "chrome", "desiredCapabilities": {name: "Banner Page"}},{"browser": "firefox", "desiredCapabilities": {name: "Banner Page"}}] | |
}, | |
}, | |
mocha: { | |
reporterOptions: { | |
"mocha-junit-reporter":{ | |
stdout: "-", | |
options: { | |
mochaFile: "report/result.xml" | |
} | |
}, | |
mochawesome: { | |
stdout: "-", | |
options: { | |
reportDir: "./report", | |
reportFilename: "Regression_Test", | |
reportTitle: "Regresstion Test", | |
reportPageTitle: "Regresstion Test", | |
ennableChart: true | |
} | |
} | |
} | |
}, | |
bootstrap: null, | |
teardown: null, | |
output: "./report", | |
hooks: [], | |
tests: "tests/*/*.js", | |
timeout: 10000, | |
name: "browserstack-home-banner-test-codeceptjs", | |
smartWait: true | |
} |
@pablopaul yes, this is a working configuration file. Command I am using to run this:
codeceptjs run-multiple --all -c browserstack.codecept.conf.js
you may refer a few sample repo's here:
https://github.com/DanteYu/codecept_practice
https://github.com/kinlu/Sample-CodeceptJS
How can I have all tests runs run on multiple platforms, e.g. Android, iOS, Mac, Windows? The config above doesn't work for me if I try and add devices.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@hanikhan are the
desiredCapabilities
inmultiple
part are working when you use this config withrun-multiple
command? I can´t get it to work.