Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: performance impact measurements #2171

Merged
merged 70 commits into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
466d695
test: appium-based android startup test (WIP)
vaind Jul 13, 2022
be814f5
chore: update appium test dependencies
vaind Jul 13, 2022
5de4fcc
test: add performance test apps
vaind Jul 13, 2022
3fe51dc
chore: perf test apps - add signing configs
vaind Jul 13, 2022
cca02ea
test: use appId
vaind Jul 13, 2022
3693a71
Format code
getsentry-bot Jul 13, 2022
93eaf86
refactor: switch appium tests to TS
vaind Jul 14, 2022
dcc86bf
chore: appium TS package cleanup
vaind Jul 14, 2022
08839af
chore: finish migration to nodejs appium
vaind Jul 14, 2022
7413898
chore: use simple-statistics in the appium test
vaind Jul 14, 2022
d7cb38a
chore: lints
vaind Jul 14, 2022
1f2973f
chore: update appium test to multi-app
vaind Jul 14, 2022
d1f36f7
chore: update appium test scripts
vaind Jul 14, 2022
31259c1
wip: upload apps to saucelabs
vaind Jul 15, 2022
99650f9
make gradlew executable in test apps
vaind Jul 15, 2022
b2f337f
fixup: saucelabs app upload
vaind Jul 15, 2022
d935121
refactor: use `appium:otherApps` instead of installApp
vaind Jul 18, 2022
4954245
ci: run appium perf test in CI
vaind Jul 18, 2022
f4850c6
test: add sentry to the startup test app
vaind Jul 18, 2022
891f3ee
Format code
getsentry-bot Jul 18, 2022
b4639f5
app-startup tests: run more iterations and filter outliers
vaind Jul 18, 2022
8b3a72d
test: compare startup times
vaind Jul 18, 2022
facd582
chore: docs
vaind Jul 18, 2022
98915c9
chore: include test-app-plain in the root gradle project
vaind Jul 18, 2022
88c8e74
test: tune logs and saucelabs info
vaind Jul 19, 2022
5a19276
test: print app size, add simple assertions, log formatting
vaind Jul 19, 2022
8c296ef
chore: move the new performance tests under sentry-android-integratio…
vaind Jul 20, 2022
a6ee6c0
move appium to appium-node
vaind Aug 1, 2022
732174d
refactor: move appium tests to kotlin (WIP)
vaind Aug 2, 2022
fdd1386
refactor: move appium tests to kotlin (WIP 2/*)
vaind Aug 3, 2022
6a814a7
refactor: move appium tests to kotlin (WIP 3/*)
vaind Aug 3, 2022
f557687
fix: SauceLabsClient - switch to ktor where file upload actually works
vaind Aug 3, 2022
b69b9ac
fix: SauceLabs otherApps format
vaind Aug 3, 2022
39d3ad0
refactor: remove node-based appium tests
vaind Aug 3, 2022
e49d9ca
Merge branch 'main' into ci/perf-tests
vaind Aug 3, 2022
e782e80
fix: make sure SauceLabsOnly is always true on CI
vaind Aug 3, 2022
0163d1c
avoid wildcard import to satisfy ktlintCheck
vaind Aug 3, 2022
a10f433
Format code
getsentry-bot Aug 3, 2022
973b876
ci: add saucelabs env vars
vaind Aug 3, 2022
fdfe700
chore: change test-app-* build.gradle to kotlin
vaind Aug 3, 2022
5793888
Merge remote-tracking branch 'origin/ci/perf-tests' into ci/perf-tests
vaind Aug 3, 2022
01ab854
chore: appium test - print test output logs
vaind Aug 3, 2022
bd43723
chore: appium test docs & minor cleanup
vaind Aug 4, 2022
47faa49
refactor: change android time collection to logcat-based
vaind Aug 4, 2022
acea7c9
chore: set measured app info as CI job outputs
vaind Aug 4, 2022
95d5c39
chore: add performance metrics to the PR comment
vaind Aug 4, 2022
7a62adf
Merge branch 'main' into ci/perf-tests
vaind Aug 4, 2022
86aa314
chore: remove wildcard import
vaind Aug 4, 2022
add51e8
fix: startup tests using logcat on SauceLabs
vaind Aug 4, 2022
6875b2d
chore: format GHA output StartTime
vaind Aug 4, 2022
6a3e607
chore: stick to Android 12 for the startup test
vaind Aug 4, 2022
7fc951f
fixup: number of runs for StartupTests on SauceLabs
vaind Aug 4, 2022
639a9e8
appium tests - ios support
vaind Aug 10, 2022
634cdb2
switch app integration test to use a github action
vaind Aug 11, 2022
316b5f3
chore: use comment-update logic in the metrics action
vaind Aug 11, 2022
153e2f2
fix ci yaml
vaind Aug 11, 2022
8d31406
update metrics GHA
vaind Aug 12, 2022
bbeb60d
Merge branch 'main' into ci/perf-tests
vaind Aug 12, 2022
5e9c63a
chore: update metrics GHA
vaind Aug 12, 2022
935e208
update perf test config
vaind Aug 12, 2022
9e63c21
ci: cache benchmark plain app
vaind Aug 14, 2022
f6723f6
switch metrics action to internal repo
vaind Aug 15, 2022
3f8cf60
Merge branch 'main' into ci/perf-tests
vaind Aug 17, 2022
a43974f
Merge branch 'main' into ci/perf-tests
vaind Sep 7, 2022
ffeb2a5
Merge branch 'main' into ci/perf-tests
marandaneto Sep 9, 2022
0e00c1a
chore: build only arm64 metrics test apps
vaind Sep 16, 2022
da971d2
chore: use Config.Android version constants in the metrics test apps
vaind Sep 16, 2022
059f3ea
fix: metrics test apps compat with old android
vaind Sep 16, 2022
f40bb1a
test: metrics binary size test range
vaind Sep 16, 2022
fde4c27
fix: metrics test apps old android compat
vaind Sep 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/integration-tests-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '**/sentry-android/**'
- '**/sentry-android-core/**'
- '**/sentry-android-ndk/**'
- '**/sentry-android-integration-tests/sentry-uitest-android-benchmark/**'
- '**/sentry-android-integration-tests/**'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid using '**/sentry-android-integration-tests/**', since we don't want to run benchmarks if we only add a ui tests (the module sentry-android-integration-tests/sentry-uitest-android)

Copy link
Collaborator Author

@vaind vaind Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess changes in uitest alone are so infrequent (to provide any benefit) that it doesn't make that much sense, considering we would need to explicitly white list the other 4 subdirectories instead?

- '**/.github/**'

jobs:
Expand Down Expand Up @@ -50,3 +50,28 @@ jobs:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-benchmark-lite.yml

startup-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: sentry-android-integration-tests/appium

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: "Set up Java: 11"
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"

- run: npm install

- run: npm run build:apps

- run: npm run saucelabs:android
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ apiValidation {
"sentry-samples-netflix-dgs",
"sentry-uitest-android",
"sentry-uitest-android-benchmark",
"test-app-plain",
"test-app-sentry",
)
)
}
Expand Down
7 changes: 7 additions & 0 deletions sentry-android-integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Android performance-impact and integration tests

* [Sample app without sentry](./test-app-plain) created with Android Studio -> New Project -> Basic Activity
* [Same app, but with Sentry included](./test-app-sentry) - made part of the root project
* [Appium based tests](./appium/)
* [Espresso-based benchmarks](./sentry-uitest-android-benchmark) - run within SauceLabs (see /.sauce/*.yml)
* [Espresso-based UI tests](./sentry-uitest-android) - run within SauceLabs (see /.sauce/*.yml)
22 changes: 22 additions & 0 deletions sentry-android-integration-tests/appium/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Log files
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log

# DS_Store
*.DS_Store

# virtual machine crash logs
hs_err_pid*

# node_modules
**/node_modules

# Optional npm cache directory
**/.npm

# files
**/.DS_Store
**/.idea
22 changes: 22 additions & 0 deletions sentry-android-integration-tests/appium/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022 Sentry
Copyright (c) 2019 saucelabs-training

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions sentry-android-integration-tests/appium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Appium-based test

Originally based on [SauceLabs's demo scripts](https://github.com/saucelabs-training/demo-js/tree/8c936c7a6865823e3251362ed5cb8ed2327c59be/webdriverio/appium-app/examples/simple-example).

## Install dependencies

```shell
npm install
```

## Compile test apps

```shell
npm run build:apps
```

## Run tests

You can run your tests on Sauce Labs:

```shell
# Run Android Tests
npm run saucelabs:android
# Run iOS Tests
npm run saucelabs:ios
```

Or you can run the tests on your local Appium installation (head over to [appium.io](https://appium.io/) to get started):

```shell
# Run Android Tests
npm run local:android
# Run iOS Tests
npm run local:ios
```
Loading