Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Lewis Cowles74,902 Points
Android and what not to test
So thinking specifically about Android, or any third party library dependant code, if our classes and libraries are fully testable without our app, is it good practice to not worry about testing these libraries (things like INTENTS in android I'd have no idea to test for example) I'd especially value input from Craig Dennis on when not to test a framework as well as anyone fluent in Android, or a Java framework where the framework itself should avoid being included in tests and how to manage (I think composing where your app controllers meet models is probably a good idea to borrow from MVC terminology)
Craig DennisTreehouse Teacher
Hi Lewis Cowles !
You definitely want to keep your unit tests testing units of work only. The goal is to get your code to be isolated. There are lots of great mocking tools for Android, one that I played with ever so briefly is Robolectric. I was impressed with it's approach and the handling of system events. You are correct, you definitely do not want to test 3rd party libs, they have probably already done that for you, and that's just duplicated work.
Remember that there are different levels of automated testing. There are also functional tests sometimes referred to as integration tests. These are usually long running tests that you'd want to kick off on a server maybe triggered by a Continuous Integration. The goal is to test that your units work together!
I think we may have Unit/Functional Testing of Android apps somewhere on the request board already, but if not, psst Ben Deitch .
Craig DennisTreehouse Teacher
Hello again James....
I do mention the Java Content request Trello board in every course since it's inception and in just about every email that I send out. I added your IntelliJ plugin request there, we'll see how many votes it gets. But you are right, maybe some non-psychics aren't sure what I'm talking about and I should've included the link. I knew that Lewis already is aware of the board because he has requested a few that we've turned, or are turning into workshops. And obviously Ben knows about the board too.
The closest thing that we have to Stickies is Featured posts. In fact, when we announced the Trello boards, the post was featured.
As far as that long post of "requests" from you, I did run across that before but was unable to get through to the end. With all the links you usually end up including I end up getting lost in an Internet hole trying to understand what you are attempting to state. Maybe with some time over the break I'll be able to power through it. If I do, I will put comments there.
Hoping you have a happy holiday!