This project is what I came out with having completed the Android Testing Codelab.
The Codelab itself begins with instructing the user to download starting code, which make up the majority of these file. The tests are actually written for you but are commented out at first. The instructions then explain each type of test and then instruct you to comment the code in as along with the lesson and run the test to see if it passed or failed. As a result, I didn't actually have an opportunity to write any tests as part of this codelab, but I did following along with and run all of the tests in:
- androidTest/java/com/example/android/testing/notes/notes/AppNavigationTest.java
- androidTest/java/com/example/android/testing/notes/notes/NotesScreenTest.java
- androidTestMock/java/com/example/android/testing/notes/addnote/AddNoteScreenTest.java
- androidTestMock/java/com/example/android/testing/notes/notedetail/NoteDetailScreenTest.java
- test/java/com/example/android/testing/notes/notes/NotesPresenterTest.java
The codelab was a great review of JUnit and Mockito for me. I had only previously had a brief introduction to Espresso, and it was great to get some tangible experience with it. I enjoyed learning to use ViewMatchers to ascertain if views are behaving as intended and the ability to match and stub intents was also exciting. I hadn't previously known how to access code coverage reports and can imagine that I will find that very useful going forward.