I’m working on Espresso tests for Android and for one of my actions I want to search a list using a SearchView, select an item and then navigate back to the previous screen (by closing the searchview and then pressing the up button). I’ve tried some things to access the up/collapse button of the SearchView to close it (that don’t
Tag: android-espresso
Android Espresso: How to create test-suite which may launch separate test classes with different activities?
I have just started studying Espresso tests, but I have searched throw StackOverFlow topics and couldn’t found solution for my needs. Prehistory of my question: I have android application with lots of activities. Generally separate UI tests were created for different flows of the app (each flow require separate activity, so that’s why I have implemented tests in a different
Android: checking a button is enabled
I am having problems testing my app. I created an espresso test which is supposed to fail, since whenever I launch my app in the emulator, I get the expected behavior. There is my test: When launching the test, nothing is reported, whereas nextQuestionButton should not be enabled upon clicking the radioButton whose text is “wrong answer”. Answer According to
How to assert inside a RecyclerView in Espresso?
I am using espresso-contrib to perform actions on a RecyclerView, and it works as it should, ex: and I need to perform assertions on it. Something like this: but, because RecyclerViewActions is, of course, expecting an action, it says wrong 2nd argument type. There’s no RecyclerViewAssertions on espresso-contrib. Is there any way to perform assertions on a RecyclerView? Answer You
What is the purpose of @SmallTest, @MediumTest, and @LargeTest annotations in Android?
I’m new to Android and I’ve seen example code using these annotations. For example: What does that annotation accomplish? Answer As an addition to Davidann’s answer and mainly OP’s question in the comment: In the context of the code above, does it actually DO anything except leave a note for other developers? Does it enforce anything? Are there any tools