-
Notifications
You must be signed in to change notification settings - Fork 585
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
test: add e2e tests for Crashlytics #6559
Draft
Lyokone
wants to merge
13
commits into
main
Choose a base branch
from
test/crashlytics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e2858ec
test: add e2e tests for Crashlytics
Lyokone d66f02e
rename
Lyokone a57db01
Working on tests, some things need refactoring and some junk files ne…
MichaelVerdon 29828a4
Some tests working
MichaelVerdon ef123b5
Tests Working
MichaelVerdon 66b9b85
e2e tests
Lyokone 00a8a05
fixes
Lyokone ebf16da
README update
Lyokone 63138da
Merge branch 'main' into test/crashlytics
Lyokone 8d2253b
more tests
Lyokone cd29c76
details
Lyokone 3d5ec0c
most tests working
Lyokone ae63ff3
update to close gracefully
Lyokone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Firebase Crashlytics Test App | ||
|
||
## Setup | ||
|
||
Download the `google-services.json` file | ||
from [Firebase Console](https://console.firebase.google.com/) (for whatever Firebase project you | ||
have or want to integrate the `test-app`) and store it under the current directory. | ||
|
||
Note: The [Package name](https://firebase.google.com/docs/android/setup#register-app) for your app | ||
created on the Firebase Console (for which the `google-services.json` is downloaded) must match | ||
the [applicationId](https://developer.android.com/studio/build/application-id.html) declared in | ||
the `test-app/test-app.gradle.kts` for the app to link to Firebase. | ||
|
||
## Running | ||
|
||
Run the test app directly from Android Studio by selecting and running | ||
the `firebase-crashlytics.test-app` run configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.google.gms.google-services") | ||
id("com.google.firebase.crashlytics") | ||
//kotlin("android") version "1.9.0" apply false | ||
} | ||
|
||
android { | ||
namespace = "com.example.test_app" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
applicationId = "com.example.test_app" | ||
minSdk = 24 | ||
targetSdk = 35 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
buildFeatures { | ||
viewBinding = true | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.material) | ||
//implementation(libs.firebase.crashlytics.ktx) | ||
testImplementation(libs.junit) | ||
testImplementation("io.mockk:mockk:1.13.8") | ||
androidTestImplementation(libs.androidx.test.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") | ||
androidTestImplementation("com.google.truth:truth:1.1.3") | ||
implementation("androidx.navigation:navigation-fragment-ktx:2.6.0") | ||
implementation("androidx.navigation:navigation-ui-ktx:2.6.0") | ||
implementation("com.google.firebase:firebase-common-ktx:21.0.0") | ||
implementation("com.google.firebase:firebase-crashlytics-ktx:19.2.1") | ||
implementation("androidx.multidex:multidex:2.0.1") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-keep class com.google.firebase.** { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
28 changes: 28 additions & 0 deletions
28
firebase-crashlytics/test-app/src/androidTest/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright 2023 Google LLC | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:versionCode="1" | ||
android:versionName="1.0.0"> | ||
|
||
<application> | ||
|
||
</application> | ||
|
||
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" /> | ||
|
||
</manifest> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be removed, was using to attempt to mock a few things but I found it was not needed