This is how my ApplicationTest class looks like: /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ @RunWith(AndroidJUnit4.class) @LargeTest public class ApplicationTest { @Rule public
There is an auxiliary class DialogIdlingResource, by which I try to run my tests. The tests take place, except this one. After pressing the button, everything stops. AcceptanceHelper.clickOnButtonInLayout(R.id.mainSignButton, R.string.common_signin_b
I am having a hard time in mocking static methods for instrumentation (Espresso) tests. For mocking objects, I am using Mockito. But, since Mockito cannot mock static methods , I am using Powermock on top of it. This works fine for tests running on t
I am getting below error continuously when I am using any Android Emulator. "GL error while resizing: 0x506 (ignored)" Do anyone has any idea how to resolve this? Does it can impact my Espresso UI test case as after this I am not able to run my
I am getting the error below in Jenkins and on certain teammates computers when running Espresso tests. I have searched this error and see a lot of it has to do with either timing out or some animation. All devices have Animations off. For example: I
Gradle sets the build to failed when unit test failed, but set BUILD SUCCESSFUL when instrumented test fails(espresso in my case) anybody know how to force build to fail when espresso failed? Ops: need this to integrate with Jenkins, so it must faile
I'm having trouble importing some of the Android UI testing framework clases - I just can't figure out what is going wrong! This is my class: @RunWith(AndroidJUnit4.class) @LargeTest public class ExampleUnitTest { @Rule public ActivityTestRule<MainAc
I am using Espresso for my UI Testing in my project. I want to take screen shot of each Activity(Screen). I am using ScreenShooter from GoogleCloudTestLab for taking screen shot. ScreenShotter.takeScreenshot("main_screen_2", getActivity()); But
I have seen Google Keynote 2016. This is link to Video So I was excited about Espresso recorder. I am not able to see the Record Espresso Test option in run menu. I am using Android studio 2.2 preview 1. Below Screen shot is from video. This question
We have a page that in a sense acts like email. So we have a Recyclerview with a bunch of TextViews, one of them being a large TextView containing all the email content. So we are just trying to test that the entire text of the email is loaded and di
How do I listen ActivityTestRule's beforeActivityLaunched() method in an android test. My workaround is creating a custom ActivityTestRule and providing a callback on constructor. Is it a bad practice? Same way is it OK to listen for ActivityTestRule
it is possible to write a Espresso test in android studio outside the application's code ? i read in the Espresso documentation that is possible to create a black-box tests with espresso but i dont find how to do itCreate a separate project with the
I have created a dummy activity inside androidTest folder and declared that activity in AndroidManifest file in androidTest folder. My basic intention is to test a reusable fragment by putting it into a dummy activity with a framelayout container. An
For last few weeks, I was using Appium(python) for android testing but yesterday we have decided to shift to Expresso(Java) for automated testing. There are couple of reasons why we are making this shift: We want to scale out our automated testing, a
I have a popupmenu. Uix screenshot provided. Now I want to verify some items in the list by clicking them and verify what's happening. But no matter what I do I don't seem to be able to select items in the popup menu. The menu does not have an id and
I have an issue using the JUnit4 @BeforeClass annotation in instrumented Android unit test (I'm using the Espresso GUI testing library). As soon as I add a test with the @BeforeClass annotation, Android Studio 1.5.1 does not run any tests at all but
I am testing one of my Android apps that has a viewpager. The ViewPager has 2 fragments. Both these framents are using the same xml as layout. This xml has a ListView in it. When I try to lookup the ListView using onData(anything()) .inAdapterView(wi
I've just migrated my androidproject from Eclipse to Android Studio and Gradle. Now I'm trying to migrate from using a separate testproject to using Gradle and Espresso 2, but I keep running into the same problem. My build wont complete when I've add
I get one really strange error when testing an activity that uses the design library: android.view.InflateException: Binary XML file line #28: Error inflating class android.support.design.widget.NavigationView at android.view.LayoutInflater.createVie
I've been trying to cover my Android app with tests and have started using espresso recently. Pretty impressed with it so far. However most of my app's functionality requires that users are logged in. And since all tests are independent, this require
I am trying to test a dynamically generated Spinner. I am able to click on the spinner but then I need to select an option from the list with a given text that is shown (I found out from hierarchyviewer that a PopupWindow is shown but am unable to ge
I'm trying to set text into text inputs on the same activity (one by one). Problem is that on first input is text filled correctly but on the second input i get exception message. android.support.test.espresso.PerformException: Error performing 'sing
I am testing an app with Espresso. I have one question is it possible to wait until there are no toast are currently being showed. I have a lot of different toast in my app, but while testing I have problems with them because as far as I can guess fo
I have this code in my Espresso test onView(withId(R.id.src)) .perform(click()); onData(hasToString(startsWith("CCD"))) .perform(click()); onView(withId(R.id.src)) .check(matches(withText(containsString("CCD")))); What I'm trying to do
I'm trying to link espresso to the project Here's error I get _MyProject:unspecified > com.android.support.test.espresso:espresso-core:2.0_ _> Could not find org.hamcrest:hamcrest-library:1.1._ Searched in the following locations: C:/Users/username/
I'm not really sure if it is event relevant, but I have a relatively complex custom Views and errors resulted by configuration changes pops up and I would definitely like to write tests for those and future cases. Currently I'm using Robolectric for
I have bitmap (R.drawable.my_image) in my android-project, How can to testing this image by espresso test UI? I want click on this image, I write: onView(withHint(R.drawable.my_image)).perform(click()); But this is not work :(It seems to me that R.dr
I have a firstActivity that launches the secondActivity, where in the secondActivity I have a loading Dialog (not AsyncTask), and I need to make Espresso wait until the dialog disappears before it continues with the test. Where do I have to implement
I have an alert dialog that displays a number of items. private String[] choices; // populated externally AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setItems(choices, new DialogInterface.OnClickListener() { @Overrid
I am using Dagger in an Android application. It is working in the Application but when I run the instrumentation tests, I am getting a NoClassDefFoundError. I am using Gradle and Espresso. This is happening WITHOUT progaurd. This is strange since the