Annyce Davis

Davis Technology Consulting

  • Home
  • About Me
  • Blog
  • Courses
  • Newsletter

Google I/O 2016 Recap

May 20, 2016 by Annyce Davis

This was my second time attending Google I/O and it was once again a great experience. I put together a few highlights of the event below:

Venue

So the event took place at Shoreline Amphitheatre in Mountain View, California. It was my first time in Mountain View and it’s such a beautiful city. On Day 1 of the conference it was a bit “toasty” outside so that proved to be challenging, but eventually the remaining days were pleasant and breezy. The majority of the talks took place inside tents and there tended to be a lot of interest on the part of attendees.

Surprisingly I am told no developers have passed out from the heat yet at #GoogleIO2016 #io16 pic.twitter.com/YaDTNxL3Mn

— Ina Fried (@inafried) May 18, 2016

Attendees

For me one of the best parts of attending I/O this year was getting to meet so many of the people that I have interacted with online. Most of them were really cool people and managed to keep their spirits up despite putting up with the heat and long lines.

Most of the Android ladies I know of in the world. Who’s missing?!? #AndroidDev #io16 pic.twitter.com/in8KjFnVHS

— Corey Latislaw 🐞 (@corey_latislaw) May 18, 2016

Takeaways

I was completely impressed with the updates to Android Studio. Some of the things that I felt would be nice to haves, like showing Gradle dependencies clearly or having the Espresso Test Recorder were released. Definitely one of the major highlights for me.
 

The latest @androidstudio is amazing!!! Merged Manifests, better support for updating dependencies, and more. #io16 pic.twitter.com/3Chc5zJq84

— Annyce Davis (@brwngrldev) May 19, 2016

 

Something that surprised me though was how Firebase has become the de facto standard of all things mobile for Google. In fact, several products were renamed “Firebase X, Y, Z”. The following tweet summarizes it best:


#io16 so far… pic.twitter.com/AEIauhNekM

— John Mahoney (@jjmiv) May 20, 2016

 

Also there were several talks on developing applications for emerging markets. I especially enjoyed the one titled, “Building for Billions”. The speakers talked about the best strategies for making sure your application is always interactive and responsive for users regardless of network and memory conditions.

All in all, I am very thankful I was able to attend; I know that everyone doesn’t get this opportunity. I learned a lot, I drank a lot of coffee, and I met some awesome folks.



Make sure you subscribe to my newsletter to keep up with my Android Adventures. Until next year…

Talk: Screen Robots UI Testing with Espresso

May 9, 2016 by Annyce Davis

Often when writing tests with Espresso you find a lot of onView, withId, perform calls scattered throughout your test methods. This takes away from the simplicity of the test, tends to be verbose and also litters resource ids everywhere. There’s got to be a better way, right? Yes, there is…Screen Robots. In this presentation you will learn how to take advantage of the Screen Robot abstraction technique.

It covers: UI Testing, Basic Espresso, and Screen Robots

Materials

  • Slides
  • Sample Code
  • Blog Post
 
If you would like to learn more about creating high quality Android applications, I encourage you to check out my video course and bite-sized video content on Caster.io.

Testing Tricks #5 – Using Screen Robots with Espresso

April 18, 2016 by Annyce Davis

In this presentation by a developer at Square: “Software Quality/Automation Testing”, he discussed how they take advantage of Robots to make it easier to update tests whenever UI elements change, as well as a few additional benefits. This is a very useful abstraction technique for when you’re writing large numbers of tests in Espresso. So let’s look at an example of using a Screen Robot to test a simple login flow.

Before Using a Screen Robot

So the above code is how you would typically make use of Espresso, where you have multiple calls to onView() and reference the resource ids directly in each test. Two main drawbacks of this approach is that 1) if you need to change the ids in the future you have to update multiple tests, and 2) it’s not very clear from first glance what you’re attempting to accomplish in a given test due to the Espresso calls. So now let’s look at the same example, this time using Screen Robots.

Notice how the test method is more succinct and more easily conveys what we are trying to do, namely login with a given username and password and then make sure that it was a success. This includes the code for our LoginScreenRobot. This allows us to have a thin abstraction layer over the Espresso calls by extending our base ScreenRobot class. Hope you found this short testing tip helpful!

Testing Tricks #2: Finding UI Views

December 7, 2015 by Annyce Davis

When you’re writing Espresso tests for your Android applications, you will often need to reference the resource id of a particular view in order to make your assertions. Instead of digging through code you can take advantage of the UIAutomatorViewer tool. It’s very simple to use and helps you to visualize the hierarchy of the views in your application. 


Here it is in action:

Espresso Test

@Test
public void clickOnDetailItemShouldDisplayPlayer() {
    onView(withId(R.id.container_list)).check(matches(isDisplayed()));
    onView(withId(R.id.browse_headers))
        .perform(pressKey(KeyEvent.KEYCODE_DPAD_RIGHT));

    onView(allOf(isDescendantOfA(
                     withRecyclerView(R.id.row_content).atPosition(0)),
           withId(R.id.info_field)))
              .perform(pressKey(KeyEvent.KEYCODE_DPAD_CENTER));

    onView(withId(R.id.wapo_player_view))
        .check(matches(isDisplayed()));
}
 
This test is for an AndroidTV application. It makes sure that the D-Pad navigation from the main header to the nested RecyclerView is functioning as expected. All of the ids for the views were found using uiautomatorviewer.


Hope you found this useful, until next time!
Next Page »

Follow Me

  • Bluesky

Categories

  • Android (60)
  • Career (5)
  • Communication (4)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • iOS (1)
  • Java (8)
  • JavaScript (6)
  • Kotlin (17)
  • Life (5)
  • Public Speaking (26)
  • Revenue (2)
  • RxJava (1)
  • Software Development (13)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (5)

Follow Me

  • Bluesky

Copyright © 2025 · All Rights Reserved · Log in