This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
25 additions
and
13 deletions.
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
3 changes: 0 additions & 3 deletions
3
allure-android-commons/src/test/kotlin/io/qameta/allure/android/AllureLifecycleTest.kt
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
25 changes: 25 additions & 0 deletions
25
allure-espresso/src/androidTest/kotlin/io/qameta/allure/android/RXCrashTest.kt
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,25 @@ | ||
package io.qameta.allure.android | ||
|
||
import android.content.Intent | ||
import androidx.test.InstrumentationRegistry | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.matcher.ViewMatchers.withId | ||
import androidx.test.rule.ActivityTestRule | ||
import androidx.test.runner.AndroidJUnit4 | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class RXCrashTest { | ||
@get:Rule | ||
val activityRule = ActivityTestRule<CrashTestActivity>(CrashTestActivity::class.java, true, false) | ||
|
||
// adb shell am instrument -w -r -e debug false -e class io.qameta.allure.android.CrashTest#rxCrash io.qameta.allure.android.test/io.qameta.allure.espresso.AllureAndroidRunner | ||
@Test | ||
fun rxCrash() { | ||
activityRule.launchActivity(Intent(InstrumentationRegistry.getTargetContext().applicationContext, CrashTestActivity::class.java)) | ||
onView(withId(R.id.rx_crash_button)).perform(click()) | ||
} | ||
} |
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