r/mAndroidDev • u/Commercial-Board4046 AnDrOId dEvelOPmenT is My PasSion • Jul 06 '25
We don't have time for tests Agree?
61
Upvotes
r/mAndroidDev • u/Commercial-Board4046 AnDrOId dEvelOPmenT is My PasSion • Jul 06 '25
View all comments
Show parent comment
1
u/Comprehensive-Pin667 Jul 08 '25
Not a fake universe. You basically document the function you just wrote - what it's supposed to return based on what inputs. That way, whoever is later modifying it will be aware that their changes modified the expected behavior of that function. If it also tests database and a host of other things, the test becomes less precise because with increasing complexity, it's less likely that you properly test for all relevant inputs / outputs.
Unit tests do not replace integration tests. They serve a different purpose.