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

Integration testing for the sentry-native new unwinder #1371

Closed
wants to merge 30 commits into from

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Apr 1, 2021

📜 Description

Two UI tests:

  • The first one spawns a service and crashes the app in the native layer.
  • The second one checks if there is a file in the .sentry-native folder

Sentry Native Version:

  • Per default, this uses 0.4.7 version of sentry-native. Please check out the correct version you want to test in the sub-module.

How to execute the tests on AppCenter:

Assuming you are running on a Mac.

  • After creating the project in AppCenter, navigate to test and start creating a new test run.
  • Select the devices.

Bildschirmfoto 2021-04-01 um 16 42 50

- Select `Espresso` as the test framework.

Bildschirmfoto 2021-04-01 um 16 43 03

- Copy the `--app` and `--devices` parameters and finish.

Bildschirmfoto 2021-04-01 um 16 43 10

  • Sign into AppCenter in the command line.
  • cd into sentry-samples/sentry-samples-android
  • Make sure you have a android device connected
  • Make sure Android Studio is installed and check your build tools version in /Library/Android/sdk/build-tools/
  • Create or add a keystore file named sentry-samples-android-keystore
  • Run appcenter script with following parameters./appcenter androidBuildToolsVersion keyAlias keyPass appCenterApp appCenterDevice for example, this might look like ./appcenter 29.0.3 yourKeyAlias yourKeyPass denrase/Sentry-Android-Sample e669fa3b
  • Wait until AppCenter is finished on all devices...

Relates to #1359

💡 Motivation and Context

💚 How did you test it?

  • Locally and on Microsoft AppCenter

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

  • Depending on what the test results yield, we might do something with the envelope file and sent the to sentry.
  • AppCenter also provides environmental variables, so we can also add info (device) to events.

@denrase denrase marked this pull request as draft April 1, 2021 14:58
@marandaneto
Copy link
Contributor

@denrase

Per default, this uses 0.4.7 version of sentry-native. Please check out the correct version you want to test in the sub-module.

it should be the current version in main which is 0.4.8, any reason why you've downgraded?

@marandaneto marandaneto changed the title [DO NOT MERGE] Integration testing for the sentry-native new unwinder Integration testing for the sentry-native new unwinder Apr 2, 2021
@marandaneto
Copy link
Contributor

no need of [DO NOT MERGE], PR is a draft already

@denrase
Copy link
Collaborator Author

denrase commented Apr 2, 2021

Jeah i had a dirty state in the submodule which i could not resolve with the current version.

@@ -1 +1,2 @@
/build
sentry-samples-android-keystore
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -0,0 +1,27 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

reportHelper.label("tearDown")
}

// Tests are run in alphabetical order...
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to be sure that they don't run in parallel

<meta-data android:name="io.sentry.dsn" android:value="https://1053864c67cc410aa1ffc9701bd6f93d@o447951.ingest.sentry.io/5428559" />


<meta-data android:name="io.sentry.auto-init" android:value="false" />
Copy link
Contributor

Choose a reason for hiding this comment

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

let's create a new sample instead of using sentry-samples-android, otherwise, the current sample is totally broken
we could call it sentry-samples-android-e2e or something like that

@marandaneto
Copy link
Contributor

the very same test should be run once getsentry/sentry-native#431 gets released (sentry-native 0.4.9) because there's also a possibility of segfaulting)

@denrase denrase closed this Aug 18, 2021
@marandaneto marandaneto deleted the feat/automated-android-native-crash branch February 26, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants