Ultimate magazine theme for WordPress.

Build Testable Apps for Android (Google I/O'19)

6


Learn how to develop a complete testing strategy that mirrors real world scenarios using the latest AndroidX Test libraries and tools by building an Android application from the ground up using modern design patterns.

Watch more #io19 here:
Android & Play at Google I/O 2019 Playlist →
Google I/O 2019 All Sessions Playlist →
Learn more on the I/O Website →

Subscribe to the Android Developers Channel →
Get started at →

Speaker: Jonathan Gerrish

T7BD73


Source: https://blogema.org
Read more all post Android Technology : https://blogema.org/android/
6 Comments
  1. Mykhailo Vasylenko says

    I can't find this app sample in the android-test repository. Can someone helps me and provide the link??

  2. n o i d says

    3:52 Shouldn't the "Speed" label be replaced with something like "Duration"? Unit tests are the fastest.

  3. Great speaker. No fluff. Easy to understand.

  4. Kashish Malhotra says

    Very nicely structured and well explained video. I have seen the previous talks of the same instructor and he is always good. Thanks for the video.

  5. SnoopyDoo says

    Here's the most optimal way that Google should implement building testable apps:

    First you need to designate a special folder in Android where developers can place files that they would use for testing. You should avoid the test folder that is currently used for unit testing because my solution would interfere with the normal functionality of that folder. Let's say Android designates a folder called "swap".
    The developer can create sub folders in this and place any source code files they want. These files will be used to swap out files either in the "main" folder or in one of the variant/flavor folders. You can even allow multiple versions of the same file exist but they would have to be placed in different folders if they have the same name.

    The developer then goes to the "Edit Configuration" menu item where they normally setup debugging configurations. If you click on a Edit Configuration and then on "app" (this is the default configuration), you will see 4 tabs (General, Miscellaneous, Debugging and Profiling). Now let's add a 5th tab called "Swap". When you click on this, it lists all the files located under the swap directory. Maybe show the files in the same tree structure as they appear under Project files. Next to each file is a checkbox. The developer then selects whatever files they want to use that will swap out any files during build.

    When the build is run, the Android plugin will check to see if a file that is to be compile exists under the swap folder that has been checked off in the app configuration settings. If so, it uses that instead of the one it would normally use.

    This solution allows the user to create multiple debug configurations that can contain combinations of swap files that are needed for testing. It also eliminates the need for dependency injection. Say good-bye to Dagger, which is nothing more than a band-aid that should never have been introduced to Android to start with.

  6. Bruno Casado says

    Is there a way to get the presentation? This type of video that hides the presentation is horrible, we can't follow what the speaker is talking about!

Leave A Reply

Your email address will not be published.