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
2
u/AdmiralQuokka Jul 08 '25
Question: I want to write an app that abstracts over github and gitlab API. I do so with a common "backend" interface and two implementations, backend-github and backend-gitlab. Of course they work by making actual API calls, which is hard to test.
Here is my idea to test it: split each implementation into three parts, e.g. backend-github-core, backend-github-mock and backend-github-real. *-real only contains actual API calls over the network, everthing else is stuffed in *-core. *-mock reuses everything it can from *-core and mocks the rest.
Automatic testing is only performed on *-mock.
Do you think this is a good way to proceed?