Skip to content

Commit f1059fd

Browse files
committed
chore: test ios browserstack
1 parent ff1c7f9 commit f1059fd

File tree

3 files changed

+86
-13
lines changed

3 files changed

+86
-13
lines changed

.github/workflows/ui-tests.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ jobs:
2727
- targetPlatform: Android
2828
buildMethod: MobileBuilder.BuildForAltTester
2929
buildPath: sample/Builds/Android
30-
- targetPlatform: iOS
31-
buildMethod: MobileBuilder.Build
32-
buildPath: build/iOS
3330
steps:
3431
- uses: actions/checkout@v3
3532
with:
@@ -60,19 +57,22 @@ jobs:
6057
path: ${{ matrix.buildPath }}
6158
test:
6259
name: Run ${{ matrix.targetPlatform }} UI tests 🧪
63-
needs: build
60+
# needs: build
6461
strategy:
6562
matrix:
6663
include:
67-
- targetPlatform: StandaloneOSX
68-
runs-on: [self-hosted, macOS]
69-
test_script: test_mac.sh
70-
- targetPlatform: StandaloneWindows64
71-
runs-on: [self-hosted, windows]
72-
test_script: test_windows.ps1
73-
- targetPlatform: Android
64+
# - targetPlatform: StandaloneOSX
65+
# runs-on: [self-hosted, macOS]
66+
# test_script: test_mac.sh
67+
# - targetPlatform: StandaloneWindows64
68+
# runs-on: [self-hosted, windows]
69+
# test_script: test_windows.ps1
70+
# - targetPlatform: Android
71+
# runs-on: [ self-hosted, macOS ]
72+
# test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml"
73+
- targetPlatform: iOS
7474
runs-on: [ self-hosted, macOS ]
75-
test_script: browserstack-sdk pytest -s ./test/test_android.py
75+
test_script: browserstack-sdk pytest -s ./test/ios.py --browserstack.config "browserstack.ios.yml"
7676
concurrency:
7777
group: test-${{ matrix.targetPlatform }}
7878
runs-on: ${{ matrix.runs-on }}

sample/Tests/browserstack.yml renamed to sample/Tests/browserstack.android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Set 'projectName' to the name of your project. Example, Marketing Website
1414
projectName: Unity Sample App
1515
# Set `buildName` as the name of the job / testsuite being run
16-
buildName: browserstack build
16+
buildName: Android build
1717
# `buildIdentifier` is a unique id to differentiate every execution that gets appended to
1818
# buildName. Choose your buildIdentifier format from the available expressions:
1919
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution

sample/Tests/browserstack.ios.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# =============================
2+
# Set BrowserStack Credentials
3+
# =============================
4+
# Add your BrowserStack userName and acccessKey here or set BROWSERSTACK_USERNAME and
5+
# BROWSERSTACK_ACCESS_KEY as env variables
6+
#userName: BROWSERSTACK_USERNAME
7+
#accessKey: BROWSERSTACK_ACCESS_KEY
8+
9+
# ======================
10+
# BrowserStack Reporting
11+
# ======================
12+
# The following capabilities are used to set up reporting on BrowserStack:
13+
# Set 'projectName' to the name of your project. Example, Marketing Website
14+
projectName: Unity Sample App
15+
# Set `buildName` as the name of the job / testsuite being run
16+
buildName: iOS build
17+
# `buildIdentifier` is a unique id to differentiate every execution that gets appended to
18+
# buildName. Choose your buildIdentifier format from the available expressions:
19+
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
20+
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
21+
# Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests
22+
buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression}
23+
framework: pytest
24+
source: pytest-browserstack:sample-sdk:v1.0
25+
26+
# Set `app` to define the app that is to be used for testing.
27+
# It can either take the id of any uploaded app or the path of the app directly.
28+
#app: ./WikipediaSample.apk
29+
app: ./Payload.ipa #For running local tests
30+
31+
# =======================================
32+
# Platforms (Browsers / Devices to test)
33+
# =======================================
34+
# Platforms object contains all the browser / device combinations you want to test on.
35+
# Entire list available here -> (https://www.browserstack.com/list-of-browsers-and-platforms/automate)
36+
37+
platforms:
38+
- platformName: ios
39+
deviceName: iPhone 14 Pro Max
40+
platformVersion: 16
41+
42+
# =======================
43+
# Parallels per Platform
44+
# =======================
45+
# The number of parallel threads to be used for each platform set.
46+
# BrowserStack's SDK runner will select the best strategy based on the configured value
47+
#
48+
# Example 1 - If you have configured 3 platforms and set `parallelsPerPlatform` as 2, a total of 6 (2 * 3) parallel threads will be used on BrowserStack
49+
#
50+
# Example 2 - If you have configured 1 platform and set `parallelsPerPlatform` as 5, a total of 5 (1 * 5) parallel threads will be used on BrowserStack
51+
parallelsPerPlatform: 1
52+
53+
# ==========================================
54+
# BrowserStack Local
55+
# (For localhost, staging/private websites)
56+
# ==========================================
57+
# Set browserStackLocal to true if your website under test is not accessible publicly over the internet
58+
# Learn more about how BrowserStack Local works here -> https://www.browserstack.com/docs/automate/selenium/local-testing-introduction
59+
browserstackLocal: true # <boolean> (Default false)
60+
browserStackLocalOptions:
61+
#Options to be passed to BrowserStack local in-case of advanced configurations
62+
# localIdentifier: # <string> (Default: null) Needed if you need to run multiple instances of local.
63+
forceLocal: true # <boolean> (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel.
64+
# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections
65+
66+
# ===================
67+
# Debugging features
68+
# ===================
69+
debug: false # <boolean> # Set to true if you need screenshots for every selenium command ran
70+
networkLogs: false # <boolean> Set to true to enable HAR logs capturing
71+
consoleLogs: errors # <string> Remote browser's console debug levels to be printed (Default: errors)
72+
# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors)
73+
acceptInsecureCerts: true

0 commit comments

Comments
 (0)