proposal: tests: introduces Espresso for integration tests
For quality improvements, and to avoid regressions, the client should have automatized tests to validate transitions, contents and scenarios. This patch introduces two examples of tests working with Espresso, which is integrated with Android Studio. Some notes: + "pm clear" is not executed between all tests, so all the tests should be considered as one test-suite. If we want to make all the tests completely independant, the TestOrchester should execute a "pm clear" between two test. Also because of this, Test are ordered via Testxxxx. + To generate tests the easy way can be: + Disable animations on the host device + In Android studio, Run, Record Espresso Test + Sometimes, elements take time to be shown. In this case, the test must be completed with waiting events. waitUntilViewIsDisplayed() can be used for this. Change-Id: Ie44b2568fb9c8570978d1d1af94562bccba6b6b2
Showing
- ring-android/app/build.gradle.kts 5 additions, 0 deletionsring-android/app/build.gradle.kts
- ring-android/app/src/androidTest/java/cx/ring/client/Test0001AccountCreation.kt 123 additions, 0 deletions...ndroidTest/java/cx/ring/client/Test0001AccountCreation.kt
- ring-android/app/src/androidTest/java/cx/ring/client/Test0002SearchDirectUri.kt 93 additions, 0 deletions...ndroidTest/java/cx/ring/client/Test0002SearchDirectUri.kt
- ring-android/app/src/androidTest/java/cx/ring/client/ViewIdlingResource.kt 86 additions, 0 deletions...src/androidTest/java/cx/ring/client/ViewIdlingResource.kt
Please register or sign in to comment