Skip to content

Commit de75d8c

Browse files
Merge pull request #2171 from bugsnag/tms/android-15
Add testing on Android 15
2 parents c3e82b2 + 3fc36d2 commit de75d8c

6 files changed

Lines changed: 118 additions & 43 deletions

File tree

.buildkite/pipeline.full.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,108 @@ steps:
869869
concurrency_group: 'browserstack-app'
870870
concurrency_method: eager
871871

872+
873+
- label: ':bitbar: Android 15 NDK r21 end-to-end tests - batch 1'
874+
depends_on: "fixture-r21"
875+
timeout_in_minutes: 60
876+
plugins:
877+
artifacts#v1.9.0:
878+
download:
879+
- "build/fixture-r21-url.txt"
880+
- "build/fixture-r21/*"
881+
upload:
882+
- "maze_output/failed/**/*"
883+
- "maze_output/metrics.csv"
884+
docker-compose#v4.7.0:
885+
pull: maze-runner
886+
run: maze-runner
887+
service-ports: true
888+
command:
889+
- "features/full_tests"
890+
- "--exclude=features/full_tests/[^a-k].*.feature"
891+
- "--exclude=features/full_tests/anr.feature"
892+
- "--app=@build/fixture-r21-url.txt"
893+
- "--appium-version=1.22"
894+
- "--no-tunnel"
895+
- "--aws-public-ip"
896+
- "--farm=bb"
897+
- "--device=ANDROID_15"
898+
test-collector#v1.10.2:
899+
files: "reports/TEST-*.xml"
900+
format: "junit"
901+
branch: "^main|next$$"
902+
env:
903+
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
904+
concurrency: 25
905+
concurrency_group: 'bitbar'
906+
concurrency_method: eager
907+
908+
- label: ':bitbar: Android 15 NDK r21 end-to-end tests - batch 2'
909+
depends_on: "fixture-r21"
910+
timeout_in_minutes: 60
911+
plugins:
912+
artifacts#v1.9.0:
913+
download:
914+
- "build/fixture-r21-url.txt"
915+
- "build/fixture-r21/*"
916+
upload:
917+
- "maze_output/failed/**/*"
918+
- "maze_output/metrics.csv"
919+
docker-compose#v4.7.0:
920+
pull: maze-runner
921+
run: maze-runner
922+
service-ports: true
923+
command:
924+
- "features/full_tests"
925+
- "--exclude=features/full_tests/[^l-z].*.feature"
926+
- "--exclude=features/full_tests/anr.feature"
927+
- "--app=@build/fixture-r21-url.txt"
928+
- "--appium-version=1.22"
929+
- "--no-tunnel"
930+
- "--aws-public-ip"
931+
- "--farm=bb"
932+
- "--device=ANDROID_15"
933+
test-collector#v1.10.2:
934+
files: "reports/TEST-*.xml"
935+
format: "junit"
936+
branch: "^main|next$$"
937+
env:
938+
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
939+
concurrency: 25
940+
concurrency_group: 'bitbar'
941+
concurrency_method: eager
942+
943+
- label: ':browserstack: Android 15 NDK r21 end-to-end tests - ANRs'
944+
depends_on: "fixture-r21"
945+
timeout_in_minutes: 30
946+
plugins:
947+
artifacts#v1.9.0:
948+
download:
949+
- "build/bs-fixture-r21-url.txt"
950+
- "build/fixture-r21/*"
951+
upload:
952+
- "maze_output/failed/**/*"
953+
- "maze_output/metrics.csv"
954+
docker-compose#v4.7.0:
955+
pull: maze-runner
956+
run: maze-runner
957+
service-ports: true
958+
command:
959+
- "features/full_tests/anr.feature"
960+
- "--app=@build/bs-fixture-r21-url.txt"
961+
- "--appium-version=1.22.0"
962+
- "--farm=bs"
963+
- "--device=ANDROID_15"
964+
test-collector#v1.10.2:
965+
files: "reports/TEST-*.xml"
966+
format: "junit"
967+
branch: "^main|next$$"
968+
env:
969+
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
970+
concurrency: 5
971+
concurrency_group: 'browserstack-app'
972+
concurrency_method: eager
973+
872974
# If there is a tag present activate a manual publishing step
873975

874976
- block: 'Trigger package publish'

features/fixtures/mazerunner/jvm-scenarios/src/main/java/com/bugsnag/android/mazerunner/scenarios/DiscardOldSessionScenario.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal class DiscardOldSessionScenario(
3333

3434
fun waitForSessionFile() {
3535
val dir = sessionDir()
36-
while (dir.listFiles()!!.isEmpty()) {
36+
while (dir.listFiles().isNullOrEmpty()) {
3737
Thread.sleep(100)
3838
}
3939
}

features/full_tests/native_session_tracking.feature

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@ Feature: NDK Session Tracking
2424
And the error payload field "events.0.session.events.unhandled" equals 1
2525

2626
Scenario: Starting a session, notifying, followed by a C crash
27-
When I run "CXXSessionInfoCrashScenario" and relaunch the crashed app
28-
And I configure Bugsnag for "CXXSessionInfoCrashScenario"
27+
When I run "CXXSessionInfoCrashScenario"
2928
And I wait to receive a session
30-
And I wait to receive 3 errors
29+
And I wait to receive 2 errors
30+
And I discard the oldest session
3131
And I discard the oldest error
3232
And I discard the oldest error
33-
Then the error payload contains a completed handled native report
34-
And the event contains session info
33+
34+
And I relaunch the app after a crash
35+
And I configure Bugsnag for "CXXSessionInfoCrashScenario"
36+
# The fixture will now send the unhandled error plus the 2 handled errors
37+
# again, because they are invoked after the delivery of the session.
38+
And I wait to receive 3 errors
3539
And the error payload field "events.0.session.events.unhandled" equals 1
36-
And the error payload field "events.0.session.events.handled" equals 2
40+
And the error payload field "events.0.session.events.handled" equals 2

features/full_tests/naughty_strings.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Feature: The notifier handles user data containing unusual strings
2626
And the error payload field "events.0.metaData.custom.val_13" equals "𝓣𝓱𝓮 𝓺𝓾𝓲𝓬𝓴 𝓫𝓻𝓸𝔀𝓷 𝓯𝓸𝔁 𝓳𝓾𝓶𝓹𝓼 𝓸𝓿𝓮𝓻 𝓽𝓱𝓮 𝓵𝓪𝔃𝔂 𝓭𝓸𝓰"
2727
And the error payload field "events.0.metaData.custom.val_14" equals "گچپژ"
2828

29-
# commented out some failing unicode assertions and skipped Android <6 until PLAT-5606 is addressed
30-
@skip_below_android_6
3129
Scenario: Test unhandled NDK error
3230
When I run "CXXNaughtyStringsScenario" and relaunch the crashed app
3331
And I configure Bugsnag for "CXXNaughtyStringsScenario"

features/full_tests/startup_anr.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Feature: onCreate ANR
99
@skip_android_10
1010
# Android 13+ Note: we no longer have permission to inject BACK button events, which are used to
1111
# trigger the ANR - so the test is not valid on Android 13 either
12-
@skip_android_13
13-
@skip_android_14
12+
@skip_above_android_13
1413
Scenario: onCreate ANR is reported
1514
When I clear any error dialogue
1615
And I run "ConfigureStartupAnrScenario"

features/support/env.rb

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
skip_this_scenario("Skipping scenario")
2525
end
2626

27+
Before('@skip_above_android_13') do |scenario|
28+
skip_this_scenario("Skipping scenario") if Maze.config.os_version >= 13
29+
end
30+
2731
Before('@skip_above_android_11') do |scenario|
2832
skip_this_scenario("Skipping scenario") if Maze.config.os_version >= 11
2933
end
@@ -32,10 +36,6 @@
3236
skip_this_scenario("Skipping scenario") if Maze.config.os_version >= 9
3337
end
3438

35-
Before('@skip_above_android_7') do |scenario|
36-
skip_this_scenario("Skipping scenario") if Maze.config.os_version >= 8
37-
end
38-
3939
Before('@skip_below_android_11') do |scenario|
4040
skip_this_scenario("Skipping scenario") if Maze.config.os_version < 11
4141
end
@@ -48,34 +48,6 @@
4848
skip_this_scenario("Skipping scenario") if Maze.config.os_version < 9
4949
end
5050

51-
Before('@skip_below_android_8') do |scenario|
52-
skip_this_scenario("Skipping scenario") if Maze.config.os_version < 8
53-
end
54-
55-
Before('@skip_below_android_6') do |scenario|
56-
skip_this_scenario("Skipping scenario") if Maze.config.os_version < 6
57-
end
58-
59-
Before('@skip_below_android_5') do |scenario|
60-
skip_this_scenario("Skipping scenario") if Maze.config.os_version < 5
61-
end
62-
63-
Before('@skip_android_14') do |scenario|
64-
skip_this_scenario("Skipping scenario") if Maze.config.os_version.floor == 14
65-
end
66-
67-
Before('@skip_android_13') do |scenario|
68-
skip_this_scenario("Skipping scenario") if Maze.config.os_version.floor == 13
69-
end
70-
7151
Before('@skip_android_10') do |scenario|
7252
skip_this_scenario("Skipping scenario") if Maze.config.os_version.floor == 10
7353
end
74-
75-
Before('@skip_android_7') do |scenario|
76-
skip_this_scenario("Skipping scenario") if Maze.config.os_version.floor == 7
77-
end
78-
79-
Before('@skip_android_6') do |scenario|
80-
skip_this_scenario("Skipping scenario") if Maze.config.os_version.floor == 6
81-
end

0 commit comments

Comments
 (0)