I just ran into an issue running EUnit tests for JVM (Android target), where the tests failed on a NullPointerException in the code (i.e. the test itself was fine, but reported that the code I was testing was generating a NPE). I ran the same code from within my Android app and the code works fine.
What I was testing is a custom Java Charset. The implementation of the Charset framework seems pretty platform-specific (as expected) so I’m wondering if the problem would be fixed by running the test on-device rather than on my dev machine?
To clarify, for iOS EBuild provides the nice option to see the EUnit test results in a TableView, but AFAIK we don’t have this option for Android (yet ). I haven’t looked into the code for EUnit much yet, but I’m aware for example that JUnit tests for Android apps needs POJOs, and you need to run integration tests on-device/emulator if you need to access anything Android-specific (contexts, filesystem, etc). This seemed like it could be the same sort of situation.
So 3 questions:
- Am I right in suspecting that this sort of test needs to run on-device?
- Does the iOS TableView display I’m referring to mean the test actually runs on the iOS device, or does it run on the dev machine and just show the results on the iOS device?
- Any chance of getting an Android equivalent of the iOS TableView display?
I would be up for writing the Android-EUnit code and submitting a PR since EUnit is open source. I wasn’t sure if there needed to be changes on the EBuild side as well though (since it unfortunately is not open source yet - I’m looking forward to that one as well ).