Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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!