23. Be precise:
•You must not write more of a test than
is sufficient to fail
•Not compiling is failing!
•You must not write more production
code than is sufficient to make the
currently failing test pass
micro-cycle (minutes)
24. Be precise:
•You must not write more of a test than
is sufficient to fail
•Not compiling is failing!
•You must not write more production
code than is sufficient to make the
currently failing test pass.
micro-cycle (minutes)
25. Be precise:
•You must not write more of a test than
is sufficient to fail
•Not compiling is failing!
•You must not write more production
code than is sufficient to make the
currently failing test pass.
micro-cycle (minutes)
29. class LoginViewModel() : ViewModel() {
...
var loginStatus: LoginStatus by
mutableStateOf(NOT_LOGGED_IN)
}
30. @Nested
inner class `when logging in` {
@Test
fun `should set loading status`() = runTest {
tested.login(this)
tested.loginStatus `should be` LOGGING_IN
}
31. @Nested
inner class `when logging in successful` {
@Test
fun `should set status to success`{
runTest {
tested.login(this)
}
tested.loginStatus `should be` LOGGED_IN
}
71. Summary
● Build the right thing (research)
● Short feedback cycles:
○ Build times
○ CD
○ Fake it
○ Test with real users
● Don’t make it perfect
● Delay Decisions
● Get everyone onboard
● Be transparent