Jean-Michel is right : Android Test is difficult and you have to extract your business logic outside of Android to not be too coupled with the framework.
To complete, I suggest you to check this Google Codelabs : it covers the basics of running and writing tests for Android. You can do the next two Codelabs after that to complete what you learned in the first one (this is all about testing, DI, mock, ...).
Thanks I have extracted as much logic outside the activity as possible but one of the main components of my app NEEDS activity context. completely testing this part will get me to around 65% code coverage (and my project is BIG). I cant find a way to pass the an activity to the method, any tips?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
thanks for the advice! your post is going to be very usefully :}
Jean-Michel is right : Android Test is difficult and you have to extract your business logic outside of Android to not be too coupled with the framework.
To complete, I suggest you to check this Google Codelabs : it covers the basics of running and writing tests for Android. You can do the next two Codelabs after that to complete what you learned in the first one (this is all about testing, DI, mock, ...).
Thanks I have extracted as much logic outside the activity as possible but one of the main components of my app NEEDS activity context. completely testing this part will get me to around 65% code coverage (and my project is BIG). I cant find a way to pass the an activity to the method, any tips?