Thursday, October 31, 2013

Android JUnit testing not firing test methods [android help]


Android JUnit testing not firing test methods



I don't know if I'm really rusty with JUnit or their is a concept with Android Testing in particular I'm not familiar with but:


I'm finding it very difficult to understand how my tests get run.


I've created a Test Project based on my main project, and created a class which extends ActivityInstrumentationTestCase2 and in this Test Case I've implemented setUp(), testPort() and tearDown() methods.


When I run the project as a Android JUnit test it all tests correctly.


However, adding another class extending ServiceTestCase with the same setUp(), testStart() and tearDown() methods implemented, the test isn't performed.


Looking through the documentation I can't find anything which states how the tests are run, I'm assuming since their is no specific setup it done via reflection.


Given that as the case however, I don't understand the documentation on TestSuites or why my Service test case isn't running.


Am I the only one that's finding the usually very well written Android Documentation lacking when it comes to testing?



Read more

stackoverflow.comm



No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...