Android Testing - Getting Started with Espresso 2.0

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • In this video we cover how to set up your Android Studio environment to use Espresso 2.0. We talk about matchers, assertions and how to use them. We also demonstrate a simple TDD (Test Driven Development Method) implementation for the first test. At the end of this screencast you should be able to set up your Android Application with the Espresso Testing framework.
    For more videos see www.caster.io or this CZcams channel: / @donnfelkeryt

Komentáře • 46

  • @VijayaPrakashKandel
    @VijayaPrakashKandel Před 9 lety +6

    You just saved my tomorrow.

  • @magosiatanska2867
    @magosiatanska2867 Před 9 lety +7

    I am waiting for more advanced examples :)

  • @tiwanakku
    @tiwanakku Před 9 lety

    Great stuff! I'm just starting with Espresso and this is exactly what I needed!

    • @zebronicsjay
      @zebronicsjay Před 8 lety

      +Martin Stefan Can continue test possible in android espresso?
      Also in case of error can we implement error collector?

  • @LogicPhalanx
    @LogicPhalanx Před 9 lety

    This is great ***** tons of useful information here.

  • @regismaltais5743
    @regismaltais5743 Před 9 lety

    I will like to remote control with TeamViewer an Android TV box. The problem that I have is there is a popup on the Android TV that ask to push a button to allow the remote control. Does Espresso can look for the popup window and click on the Allow button for me ?

  • @vipin_thegame
    @vipin_thegame Před 8 lety

    Thank you! Nicely explained :)

  • @akshatsharda8018
    @akshatsharda8018 Před 8 lety

    Hey, nice video, but there is a problem that I'm facing with setting up the androidTest directory. Android studio doesn't recognize it as a test directory, and upon running a sample test, it reports 'no tests were found.' I also have a 'test' directory with unit test cases in it, but i did change the build artifact to Android Instrumentation Tests. The test directory is being detected properly.

  • @dmitrykologrivko
    @dmitrykologrivko Před 9 lety

    Thank you very much, good lesson

  • @emmanouilkounalakis1952

    Great tutorial

  • @bubblesDF
    @bubblesDF Před 9 lety

    Great tutorial thanks

  • @VAdaihieph
    @VAdaihieph Před 9 lety

    Thanks, very useful.

  • @abzal9551
    @abzal9551 Před 7 lety +1

    where can i download the app for testing?

  • @redelpedron325
    @redelpedron325 Před 8 lety

    Thank you.

  • @anilphilip546
    @anilphilip546 Před 8 lety

    @donnfelker How to simulate the clicking of the application icon on the home screen? I do not want to run Activity Rule because I have more than one launchable Activity. I have 3 icons, actually. One for each Activity.

  • @zebronicsjay
    @zebronicsjay Před 8 lety

    Can continue test possible in android espresso?
    Also in case of error can we implement error collector?
    Please help me for the same.

  • @VishnuTB7
    @VishnuTB7 Před 6 lety

    thank you

  • @girijajoshi8911
    @girijajoshi8911 Před 6 lety

    Hi, i am new to android app testing. I have ready developed app (no source code) just APK. Can i use Espresso to test UI? If not any other tool?

  • @kem5134
    @kem5134 Před 9 lety

    Thanks for the video. It was very helpfull. :)

  • @hugovera1540
    @hugovera1540 Před 3 lety

    Is there some source code somewhere? The app that is being tested is not being showed up

    • @donnfelkeryt
      @donnfelkeryt  Před 3 lety

      No. This video is very old and I’m not sure the code would even compile with the modern tooling anymore.

  • @codingwithshamy1745
    @codingwithshamy1745 Před 5 lety

    why did you stop uploading more videos?

  • @TheHagelberg
    @TheHagelberg Před 6 lety

    could you show me code in class MainActivity and NavigationDrawerFragment?

  • @9932shashank
    @9932shashank Před 3 lety

    Hi Donn, is it possible to run Espresso tests without app development source code? I have a release apk file which i want to test with Espresso test. Is it possible to write it? if yes, can you give some pointers or github link please?

    • @donnfelkeryt
      @donnfelkeryt  Před 3 lety

      Check this link out: stackoverflow.com/a/18064368

  • @yogeshranjitkar5299
    @yogeshranjitkar5299 Před 8 lety

    Can you please explain from where you copied the androidTestCompile and pasted it in dependencies..

    • @Jackty89
      @Jackty89 Před 7 lety +1

      google.github.io/android-testing-support-library/docs/espresso/setup/index.html

    • @philipyoung7034
      @philipyoung7034 Před 3 lety

      @@Jackty89 404 error: File not found

  • @ThanhTranIT
    @ThanhTranIT Před 8 lety

    very useful so I hava just subscribed chanel :)

    • @MrConkerLynch
      @MrConkerLynch Před 8 lety

      +Thanh Tran Hey Thanh just wondering where did you get ActivityRule.java? I cant find it on Jake's account

  • @DannTeBg
    @DannTeBg Před 7 lety

    how to do that on a fragment?

  • @MrNiceseb
    @MrNiceseb Před 9 lety

    Please show Twitter login WebView Espresso example? Thanks

  • @haonanzhao92
    @haonanzhao92 Před 8 lety

    Can you give us the link for activity rule, i found the link is not valid anymore

    • @noodlesnsoup
      @noodlesnsoup Před 8 lety

      +Haonan Zhao add androidTestCompile 'com.android.support.test:rules:0.4' to your depdencies; afterwards you can use the ActivityTestRule imported from the JUnit Rules

    • @FurociousN
      @FurociousN Před 8 lety

      +Haonan Zhao gist.github.com/JakeWharton/1c2f2cadab2ddd97f9fb

    • @philipyoung7034
      @philipyoung7034 Před 3 lety

      Yay! for Jake Wharton. His code is now part of the repository. "This test rule is now in the 'test-rules' support repository. Use that one!" Sad for us because this excellent tutorial is missing its key feature.
      I found a clone of the ActivityRule.java file, but I cannot get it to work. "Cannot resolve symbol InstrumentationRegistry"

  • @ColtWillcox
    @ColtWillcox Před 8 lety +4

    I still don't understand the real life purpose of testing. :(

    • @vankwisha
      @vankwisha Před 8 lety +10

      So you don't release something with bugs lol

    • @asdqwe4427
      @asdqwe4427 Před 7 lety +2

      VaNkWiShA something with less bugs.

    • @meajudalimpeza5312
      @meajudalimpeza5312 Před 7 lety

      I work in a company that every new release, we need to run the same test. This allows me to do it automatic, which is faster and more consistent.

    • @marekkubacka315
      @marekkubacka315 Před 7 lety

      I work as Software Tester, and believe, there is meaning why to make testing manual or automatic

    • @thomasnguyen6923
      @thomasnguyen6923 Před 7 lety +1

      Manual testing is usually for finding new bugs. Automation testing is for testing previous and new requirements automatically so we don't test non stop. Usually a dev doesn't have time to test extensively his code. That's what a tester is for.
      For a small application (i.e. school homework), you don't need a tester. But when you deal with thousand of files, this can be time consuming and it is best to catch bugs before the customers experience them.

  • @vishalkumarsinghvi
    @vishalkumarsinghvi Před 7 lety

    cheet sheet in prezi:-prezi.com/piqd29upzrii