~/talk

Unit testing on Android

Talkat droidcon Berlin 2015 · 2015-06-15..06-17· [testing, android]
links:none on file
slides:none on file

Defines unit test as isolating a single method, class or component and shows concrete examples wired in Gradle using Gradle + JUnit + Mockito + Robolectric to run tests on the JVM so Android code runs without a device, demonstrates @Mock, @InjectMocks and Spy behaviors with actual assertions, and runs coverage with JaCoCo shows line/branch/method/class coverage reporting green/yellow/red lines. Argues test-first or after is optional, claims unit tests act as living docs and force testable design, and measures when to stop based on coverage metrics.

AI-written summary · about

  1. 0:00Intro
  2. 0:28ABOUT ME
  3. 1:37UNIT TEST
  4. 4:24WHY TEST YOUR CODE ?
  5. 6:55Test frameworks for Android
  6. 7:43JUnit JUnit is a simple framework to write repeatable tests.
  7. 9:58Initial Test Case With Annotations
  8. 10:43Assertions
  9. 11:11Test Suites
  10. 13:29mockitc
  11. 17:36Test Coverage JaCoCo is a free code coverage library for Java
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.