Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
rft imports, add RXCrashTest
Browse files Browse the repository at this point in the history
  • Loading branch information
viclovsky committed Oct 28, 2019
1 parent 00dff73 commit 7cfd79b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ open class AllureRunListener(private val lifecycle: AllureLifecycle = AllureComm
updateTestCase(uuid) {
status = Status.fromThrowable(failure.exception)
statusDetails = StatusDetails.fromThrowable(failure.exception)
stop = System.currentTimeMillis()
}
stopTestCase(uuid)
writeTestCase(uuid)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.qameta.allure.android

import io.qameta.allure.android.AllureCommonLifecycle
import io.qameta.allure.android.AllureLifecycle
import io.qameta.allure.android.AllureStorage
import org.junit.After
import org.junit.Assert
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,4 @@ class CrashTest {
activityRule.launchActivity(Intent(InstrumentationRegistry.getTargetContext().applicationContext, CrashTestActivity::class.java))
onView(withId(R.id.crash_button)).perform(click())
}

// 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())
}
}
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())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import io.qameta.allure.android.AllureRunListener
import org.junit.runner.Description
import org.junit.runner.Result
import org.junit.runner.notification.Failure
import io.qameta.allure.android.model.Status
import io.qameta.allure.android.model.StatusDetails

/**
* @author Badya on 05.06.2017.
Expand Down

0 comments on commit 7cfd79b

Please sign in to comment.