From 7e903561f9582517a855b41be4daa78eb182b273 Mon Sep 17 00:00:00 2001 From: YYChen01988 Date: Thu, 9 Jan 2025 09:12:27 +0000 Subject: [PATCH 1/6] test(upgrade) update AGP and compileSdk versions --- features/fixtures/mazerunner/app/build.gradle | 6 +++--- features/fixtures/mazerunner/build.gradle | 2 +- features/fixtures/mazerunner/cxx-scenarios/build.gradle | 4 ++-- features/full_tests/internal_error_reports.feature | 2 +- features/full_tests/load_configuration.feature | 2 +- features/smoke_tests/01_anr.feature | 2 +- features/smoke_tests/02_handled.feature | 4 ++-- features/smoke_tests/03_sessions.feature | 2 +- features/smoke_tests/04_unhandled.feature | 2 +- features/steps/android_steps.rb | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/fixtures/mazerunner/app/build.gradle b/features/fixtures/mazerunner/app/build.gradle index 49dea80520..6efd873531 100644 --- a/features/fixtures/mazerunner/app/build.gradle +++ b/features/fixtures/mazerunner/app/build.gradle @@ -4,13 +4,13 @@ apply plugin: "io.gitlab.arturbosch.detekt" apply plugin: "org.jlleitschuh.gradle.ktlint" android { - compileSdk 34 + compileSdk 35 ndkVersion parent.ext.ndkVersion defaultConfig { minSdkVersion 17 - targetSdkVersion 34 - versionCode 34 + targetSdkVersion 35 + versionCode 35 versionName "1.1.14" manifestPlaceholders = [ // omit any of the following placeholders to use the default values diff --git a/features/fixtures/mazerunner/build.gradle b/features/fixtures/mazerunner/build.gradle index dca8c57f85..ef76177dc1 100644 --- a/features/fixtures/mazerunner/build.gradle +++ b/features/fixtures/mazerunner/build.gradle @@ -23,7 +23,7 @@ buildscript { dependencies { def agpVersion = project.hasProperty("USE_AGP_VERSION") ? project.property("USE_AGP_VERSION") - : "8.5.0" + : "8.6.1" project.logger.lifecycle("Using AGP $agpVersion") classpath "com.android.tools.build:gradle:$agpVersion" diff --git a/features/fixtures/mazerunner/cxx-scenarios/build.gradle b/features/fixtures/mazerunner/cxx-scenarios/build.gradle index a9723680de..8c515b382c 100644 --- a/features/fixtures/mazerunner/cxx-scenarios/build.gradle +++ b/features/fixtures/mazerunner/cxx-scenarios/build.gradle @@ -7,11 +7,11 @@ apply plugin: "io.gitlab.arturbosch.detekt" apply plugin: "org.jlleitschuh.gradle.ktlint" android { - compileSdkVersion 31 + compileSdkVersion 35 ndkVersion parent.ext.ndkVersion defaultConfig { - minSdkVersion 14 + minSdkVersion 17 } buildTypes { diff --git a/features/full_tests/internal_error_reports.feature b/features/full_tests/internal_error_reports.feature index 0e7cee8371..7715a31b23 100644 --- a/features/full_tests/internal_error_reports.feature +++ b/features/full_tests/internal_error_reports.feature @@ -40,7 +40,7 @@ Feature: Cached Error Reports And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/full_tests/load_configuration.feature b/features/full_tests/load_configuration.feature index c00efd64c9..675d399eb4 100644 --- a/features/full_tests/load_configuration.feature +++ b/features/full_tests/load_configuration.feature @@ -43,7 +43,7 @@ Feature: Loading values into the configuration And the event "app.releaseStage" is not null And the event "metaData.test.foo" equals "bar" And the event "metaData.test.filter_me" equals "foobar" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the event "app.buildUUID" is not null And the event "app.version" equals "1.1.14" And the event "app.type" is null diff --git a/features/smoke_tests/01_anr.feature b/features/smoke_tests/01_anr.feature index aef13fe2f0..59b057a776 100644 --- a/features/smoke_tests/01_anr.feature +++ b/features/smoke_tests/01_anr.feature @@ -40,7 +40,7 @@ Feature: ANR smoke test And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/smoke_tests/02_handled.feature b/features/smoke_tests/02_handled.feature index 417f1139f4..5b62521509 100644 --- a/features/smoke_tests/02_handled.feature +++ b/features/smoke_tests/02_handled.feature @@ -40,7 +40,7 @@ Feature: Handled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true @@ -196,7 +196,7 @@ Feature: Handled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/smoke_tests/03_sessions.feature b/features/smoke_tests/03_sessions.feature index 7d98cf16bd..937ae1103f 100644 --- a/features/smoke_tests/03_sessions.feature +++ b/features/smoke_tests/03_sessions.feature @@ -24,7 +24,7 @@ Feature: Session functionality smoke tests And the session payload field "app.releaseStage" equals "mazerunner" And the session payload field "app.type" equals "android" And the session payload field "app.version" equals "1.1.14" - And the session payload field "app.versionCode" equals 34 + And the session payload field "app.versionCode" equals 35 # Device data And the session payload field "device.cpuAbi" is a non-empty array diff --git a/features/smoke_tests/04_unhandled.feature b/features/smoke_tests/04_unhandled.feature index 23c7f5f372..17da27cafa 100644 --- a/features/smoke_tests/04_unhandled.feature +++ b/features/smoke_tests/04_unhandled.feature @@ -41,7 +41,7 @@ Feature: Unhandled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 34 + And the event "app.versionCode" equals 35 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/steps/android_steps.rb b/features/steps/android_steps.rb index 8f37590151..30c06947a1 100644 --- a/features/steps/android_steps.rb +++ b/features/steps/android_steps.rb @@ -174,7 +174,7 @@ def wait_for_app_state(expected_state) And the error payload field "events.0.app.releaseStage" is not null And the error payload field "events.0.app.type" equals "android" And the error payload field "events.0.app.version" is not null - And the error payload field "events.0.app.versionCode" equals 34 + And the error payload field "events.0.app.versionCode" equals 35 And the error payload field "events.0.device.id" is not null And the error payload field "events.0.device.locale" is not null And the error payload field "events.0.device.manufacturer" is not null From 55aaa9cede8baa499fbbbe8d83c14fbd936242af Mon Sep 17 00:00:00 2001 From: YYChen01988 Date: Thu, 9 Jan 2025 11:10:53 +0000 Subject: [PATCH 2/6] test(mazerunner) replace android 14 with android 15 in pipeline.yml and move android 14 to pipeline.full.yml --- .buildkite/pipeline.full.yml | 65 ++++++++++++++++++++++++++++++++++++ .buildkite/pipeline.yml | 8 ++--- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.full.yml b/.buildkite/pipeline.full.yml index cfeac04440..8bdd53838b 100644 --- a/.buildkite/pipeline.full.yml +++ b/.buildkite/pipeline.full.yml @@ -901,3 +901,68 @@ steps: docker-compose#v4.7.0: no-cache: true run: android-publisher + + - label: ':bitbar: Android 14 NDK r21 smoke tests' + depends_on: "fixture-r21" + timeout_in_minutes: 30 + plugins: + artifacts#v1.9.0: + download: + - "build/fixture-r21-url.txt" + - "build/fixture-r21/*" + upload: + - "maze_output/failed/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner + run: maze-runner + service-ports: true + command: + - "features/smoke_tests" + - "--exclude=features/smoke_tests/01_anr.feature" + - "--app=@build/fixture-r21-url.txt" + - "--appium-version=1.22" + - "--no-tunnel" + - "--aws-public-ip" + - "--farm=bb" + - "--device=ANDROID_14" + test-collector#v1.10.2: + files: "reports/TEST-*.xml" + format: "junit" + branch: "^master|next$$" + env: + TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21" + concurrency: 25 + concurrency_group: 'bitbar' + concurrency_method: eager + + - label: ':browserstack: Android 14 NDK r21 ANR smoke tests' + depends_on: "fixture-r21" + timeout_in_minutes: 30 + plugins: + artifacts#v1.9.0: + download: + - "build/bs-fixture-r21-url.txt" + - "build/fixture-r21/*" + upload: + - "maze_output/failed/**/*" + - "maze_output/metrics.csv" + docker-compose#v4.7.0: + pull: maze-runner + run: maze-runner + service-ports: true + command: + - "features/smoke_tests/01_anr.feature" + - "--app=@build/bs-fixture-r21-url.txt" + - "--appium-version=1.22.0" + - "--farm=bs" + - "--device=ANDROID_14" + test-collector#v1.10.2: + files: "reports/TEST-*.xml" + format: "junit" + branch: "^master|next$$" + env: + TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21" + concurrency: 5 + concurrency_group: 'browserstack-app' + concurrency_method: eager diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 1fe389f929..1299009be7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -598,7 +598,7 @@ steps: concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':bitbar: Android 14 NDK r21 smoke tests' + - label: ':bitbar: Android 15 NDK r21 smoke tests' depends_on: "fixture-r21" timeout_in_minutes: 30 plugins: @@ -621,7 +621,7 @@ steps: - "--no-tunnel" - "--aws-public-ip" - "--farm=bb" - - "--device=ANDROID_14" + - "--device=ANDROID_15" test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" @@ -632,7 +632,7 @@ steps: concurrency_group: 'bitbar' concurrency_method: eager - - label: ':browserstack: Android 14 NDK r21 ANR smoke tests' + - label: ':browserstack: Android 15 NDK r21 ANR smoke tests' depends_on: "fixture-r21" timeout_in_minutes: 30 plugins: @@ -652,7 +652,7 @@ steps: - "--app=@build/bs-fixture-r21-url.txt" - "--appium-version=1.22.0" - "--farm=bs" - - "--device=ANDROID_14" + - "--device=ANDROID_15" test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" From d6ff1f29e134d859d3205950af2b10daa2ffabc2 Mon Sep 17 00:00:00 2001 From: YYChen01988 Date: Thu, 9 Jan 2025 14:20:34 +0000 Subject: [PATCH 3/6] test(mazerunner) replace android 14 with android 15 in pipeline.yml --- .buildkite/pipeline.yml | 16 +++++++--------- .../cxx-scenarios-bugsnag/build.gradle | 4 ++-- .../mazerunner/jvm-scenarios/build.gradle | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 1299009be7..0367969f94 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -598,13 +598,13 @@ steps: concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':bitbar: Android 15 NDK r21 smoke tests' + - label: ':browserstack: Android 15 NDK r21 smoke tests' depends_on: "fixture-r21" timeout_in_minutes: 30 plugins: artifacts#v1.9.0: download: - - "build/fixture-r21-url.txt" + - "build/bs-fixture-r21-url.txt" - "build/fixture-r21/*" upload: - "maze_output/failed/**/*" @@ -616,11 +616,9 @@ steps: command: - "features/smoke_tests" - "--exclude=features/smoke_tests/01_anr.feature" - - "--app=@build/fixture-r21-url.txt" - - "--appium-version=1.22" - - "--no-tunnel" - - "--aws-public-ip" - - "--farm=bb" + - "--app=@build/bs-fixture-r21-url.txt" + - "--appium-version=1.22.0" + - "--farm=bs" - "--device=ANDROID_15" test-collector#v1.10.2: files: "reports/TEST-*.xml" @@ -628,8 +626,8 @@ steps: branch: "^master|next$$" env: TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21" - concurrency: 25 - concurrency_group: 'bitbar' + concurrency: 5 + concurrency_group: 'browserstack-app' concurrency_method: eager - label: ':browserstack: Android 15 NDK r21 ANR smoke tests' diff --git a/features/fixtures/mazerunner/cxx-scenarios-bugsnag/build.gradle b/features/fixtures/mazerunner/cxx-scenarios-bugsnag/build.gradle index 1cc184d0e3..5f73ea9851 100644 --- a/features/fixtures/mazerunner/cxx-scenarios-bugsnag/build.gradle +++ b/features/fixtures/mazerunner/cxx-scenarios-bugsnag/build.gradle @@ -7,11 +7,11 @@ apply plugin: "io.gitlab.arturbosch.detekt" apply plugin: "org.jlleitschuh.gradle.ktlint" android { - compileSdkVersion 31 + compileSdkVersion 35 ndkVersion parent.ext.ndkVersion defaultConfig { - minSdkVersion 16 + minSdkVersion 17 } buildTypes { diff --git a/features/fixtures/mazerunner/jvm-scenarios/build.gradle b/features/fixtures/mazerunner/jvm-scenarios/build.gradle index 5ac7256c16..f23dac4517 100644 --- a/features/fixtures/mazerunner/jvm-scenarios/build.gradle +++ b/features/fixtures/mazerunner/jvm-scenarios/build.gradle @@ -7,7 +7,7 @@ apply plugin: "io.gitlab.arturbosch.detekt" apply plugin: "org.jlleitschuh.gradle.ktlint" android { - compileSdkVersion 31 + compileSdkVersion 35 defaultConfig { minSdkVersion 17 From b226cce5deca8b4f30ccf5d3ac848eddbb90f429 Mon Sep 17 00:00:00 2001 From: YYChen01988 Date: Mon, 13 Jan 2025 10:33:18 +0000 Subject: [PATCH 4/6] test(versioncode) change versioncode in mazerunner app to 1 --- features/fixtures/mazerunner/app/build.gradle | 2 +- features/full_tests/internal_error_reports.feature | 2 +- features/full_tests/load_configuration.feature | 2 +- features/smoke_tests/01_anr.feature | 2 +- features/smoke_tests/02_handled.feature | 4 ++-- features/smoke_tests/03_sessions.feature | 2 +- features/smoke_tests/04_unhandled.feature | 2 +- features/steps/android_steps.rb | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/features/fixtures/mazerunner/app/build.gradle b/features/fixtures/mazerunner/app/build.gradle index 6efd873531..9ff091d770 100644 --- a/features/fixtures/mazerunner/app/build.gradle +++ b/features/fixtures/mazerunner/app/build.gradle @@ -10,7 +10,7 @@ android { defaultConfig { minSdkVersion 17 targetSdkVersion 35 - versionCode 35 + versionCode 1 versionName "1.1.14" manifestPlaceholders = [ // omit any of the following placeholders to use the default values diff --git a/features/full_tests/internal_error_reports.feature b/features/full_tests/internal_error_reports.feature index 7715a31b23..f53b999142 100644 --- a/features/full_tests/internal_error_reports.feature +++ b/features/full_tests/internal_error_reports.feature @@ -40,7 +40,7 @@ Feature: Cached Error Reports And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/full_tests/load_configuration.feature b/features/full_tests/load_configuration.feature index 675d399eb4..e6e820bf21 100644 --- a/features/full_tests/load_configuration.feature +++ b/features/full_tests/load_configuration.feature @@ -43,7 +43,7 @@ Feature: Loading values into the configuration And the event "app.releaseStage" is not null And the event "metaData.test.foo" equals "bar" And the event "metaData.test.filter_me" equals "foobar" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the event "app.buildUUID" is not null And the event "app.version" equals "1.1.14" And the event "app.type" is null diff --git a/features/smoke_tests/01_anr.feature b/features/smoke_tests/01_anr.feature index 59b057a776..0bc200017c 100644 --- a/features/smoke_tests/01_anr.feature +++ b/features/smoke_tests/01_anr.feature @@ -40,7 +40,7 @@ Feature: ANR smoke test And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/smoke_tests/02_handled.feature b/features/smoke_tests/02_handled.feature index 5b62521509..9d8943b73e 100644 --- a/features/smoke_tests/02_handled.feature +++ b/features/smoke_tests/02_handled.feature @@ -40,7 +40,7 @@ Feature: Handled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true @@ -196,7 +196,7 @@ Feature: Handled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/smoke_tests/03_sessions.feature b/features/smoke_tests/03_sessions.feature index 937ae1103f..4ba4b84d76 100644 --- a/features/smoke_tests/03_sessions.feature +++ b/features/smoke_tests/03_sessions.feature @@ -24,7 +24,7 @@ Feature: Session functionality smoke tests And the session payload field "app.releaseStage" equals "mazerunner" And the session payload field "app.type" equals "android" And the session payload field "app.version" equals "1.1.14" - And the session payload field "app.versionCode" equals 35 + And the session payload field "app.versionCode" equals 1 # Device data And the session payload field "device.cpuAbi" is a non-empty array diff --git a/features/smoke_tests/04_unhandled.feature b/features/smoke_tests/04_unhandled.feature index 17da27cafa..5c1beb7b92 100644 --- a/features/smoke_tests/04_unhandled.feature +++ b/features/smoke_tests/04_unhandled.feature @@ -41,7 +41,7 @@ Feature: Unhandled smoke tests And the event "app.releaseStage" equals "mazerunner" And the event "app.type" equals "android" And the event "app.version" equals "1.1.14" - And the event "app.versionCode" equals 35 + And the event "app.versionCode" equals 1 And the error payload field "events.0.app.duration" is an integer And the error payload field "events.0.app.durationInForeground" is an integer And the event "app.inForeground" is true diff --git a/features/steps/android_steps.rb b/features/steps/android_steps.rb index 30c06947a1..d07d355dd1 100644 --- a/features/steps/android_steps.rb +++ b/features/steps/android_steps.rb @@ -174,7 +174,7 @@ def wait_for_app_state(expected_state) And the error payload field "events.0.app.releaseStage" is not null And the error payload field "events.0.app.type" equals "android" And the error payload field "events.0.app.version" is not null - And the error payload field "events.0.app.versionCode" equals 35 + And the error payload field "events.0.app.versionCode" equals 1 And the error payload field "events.0.device.id" is not null And the error payload field "events.0.device.locale" is not null And the error payload field "events.0.device.manufacturer" is not null From 977441369f62014833021fe8b869c99df776bdb6 Mon Sep 17 00:00:00 2001 From: YYChen01988 Date: Fri, 17 Jan 2025 09:49:22 +0000 Subject: [PATCH 5/6] dep(mazerunner) change targetSdkVersion back to 34 --- features/fixtures/mazerunner/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/fixtures/mazerunner/app/build.gradle b/features/fixtures/mazerunner/app/build.gradle index 9ff091d770..0ca7c781be 100644 --- a/features/fixtures/mazerunner/app/build.gradle +++ b/features/fixtures/mazerunner/app/build.gradle @@ -9,7 +9,7 @@ android { defaultConfig { minSdkVersion 17 - targetSdkVersion 35 + targetSdkVersion 34 versionCode 1 versionName "1.1.14" manifestPlaceholders = [ From 555b9608c95d094c3c553eb350508fe122647f30 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 29 Jan 2025 10:10:51 +0000 Subject: [PATCH 6/6] dep(compileSdk): changed removeLast -> removeAt(event.breadcrumbs.lastIndex) for compileSdk 35 compatibility --- .../scenarios/UnhandledExceptionEventDetailChangeScenario.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/fixtures/mazerunner/jvm-scenarios/src/main/java/com/bugsnag/android/mazerunner/scenarios/UnhandledExceptionEventDetailChangeScenario.kt b/features/fixtures/mazerunner/jvm-scenarios/src/main/java/com/bugsnag/android/mazerunner/scenarios/UnhandledExceptionEventDetailChangeScenario.kt index 2cac1f5885..9730e8cc2d 100644 --- a/features/fixtures/mazerunner/jvm-scenarios/src/main/java/com/bugsnag/android/mazerunner/scenarios/UnhandledExceptionEventDetailChangeScenario.kt +++ b/features/fixtures/mazerunner/jvm-scenarios/src/main/java/com/bugsnag/android/mazerunner/scenarios/UnhandledExceptionEventDetailChangeScenario.kt @@ -55,7 +55,7 @@ internal class UnhandledExceptionEventDetailChangeScenario( event.device.freeMemory = 123456 event.device.orientation = "portrait" - event.breadcrumbs.removeLast() + event.breadcrumbs.removeAt(event.breadcrumbs.lastIndex) event.breadcrumbs.first().type = BreadcrumbType.ERROR event.breadcrumbs.first().message = "new breadcrumb message" event.breadcrumbs[1].type = BreadcrumbType.ERROR