mirror of
https://github.com/hmalik144/sumtest.git
synced 2025-12-10 03:05:27 +00:00
android circleci pipeline publish results test
This commit is contained in:
@@ -3,3 +3,7 @@ Feature: Sample feature file
|
||||
@sample_test
|
||||
Scenario: Successful login
|
||||
Given I start the application
|
||||
|
||||
@sample_test
|
||||
Scenario: Unsuccessful login
|
||||
Given I start the application and throw an exception
|
||||
|
||||
@@ -18,11 +18,21 @@ class SampleSteps {
|
||||
}
|
||||
|
||||
@Given("I start the application")
|
||||
fun I_start_the_application() {
|
||||
fun i_start_the_application() {
|
||||
mActivityScenarioRule.moveToState(Lifecycle.State.STARTED)
|
||||
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
Assert.assertEquals("com.example.sumtest", appContext.packageName)
|
||||
}
|
||||
|
||||
@Given("I start the application and throw an exception")
|
||||
fun i_start_the_application_and_throw_an_exception() {
|
||||
mActivityScenarioRule.moveToState(Lifecycle.State.STARTED)
|
||||
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
Assert.assertEquals("com.example.sumtest", appContext.packageName)
|
||||
|
||||
throw Exception("This is an exception")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user