Skip to content

Commit 21dc3ab

Browse files
authored
daily job running mobile example on real devices (#8216)
# Objective - Test mobile example on real devices ## Solution - Use [BrowserStack](https://www.browserstack.com) to have access to [real devices](https://www.browserstack.com/list-of-browsers-and-platforms/app_automate) - [App Automate](https://www.browserstack.com/app-automate) to run the example - [App Percy](https://www.browserstack.com/app-percy) to compare the screenshot - Added a daily/manual CI job that will build for iOS and Android, send the apps to BrowserStack, run the app on one iOS device and one Android device, capture a screenshot, send it for visual validation, and archive it in the GitHub action Example run: https://github.com/mockersf/bevy/actions/runs/4521883534 They currently have a bug with the settings to view snapshots, they should be public. I'll raise it to them, and if they don't fix it in time it's possible to work around for everyone to view the results through their API. @cart to get this to work, you'll need - to set up an account on BrowserStack - add the secrets `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` to the Bevy repo - create a project in Percy - add the secret `PERCY_TOKEN` to the Bevy repo and modify the project name line 122 in the `Daily.yml` file
1 parent 0893852 commit 21dc3ab

File tree

10 files changed

+4958
-16
lines changed

10 files changed

+4958
-16
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
/test-results/
3+
/playwright-report/
4+
/playwright/.cache/
5+
screenshot.png
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
exports.config = {
2+
user: process.env.BROWSERSTACK_USERNAME,
3+
key: process.env.BROWSERSTACK_ACCESS_KEY,
4+
5+
updateJob: false,
6+
specs: [
7+
'./specs/screenshot.js'
8+
],
9+
exclude: [],
10+
11+
capabilities: [{
12+
project: "Bevy Example",
13+
build: 'Bevy Example Runner',
14+
name: 'run_example',
15+
device: process.env.DEVICE || 'Samsung Galaxy S23',
16+
os_version: process.env.OS_VERSION || "13.0",
17+
app: process.env.BROWSERSTACK_APP_ID,
18+
'browserstack.debug': true,
19+
orientation: 'LANDSCAPE'
20+
}],
21+
22+
logLevel: 'info',
23+
coloredLogs: true,
24+
screenshotPath: './screenshots/',
25+
baseUrl: '',
26+
waitforTimeout: 10000,
27+
connectionRetryTimeout: 90000,
28+
connectionRetryCount: 3,
29+
30+
framework: 'mocha',
31+
mochaOpts: {
32+
ui: 'bdd',
33+
timeout: 20000
34+
}
35+
};

0 commit comments

Comments
 (0)