Unit tests for OpenSatNav

Bug #579468 reported by droidguy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSatNav
New
Medium
droidguy

Bug Description

Unit tests for OSN. In two separate projects (each of them depends on the OpenSatNav:

* OpenSatNav_AndroidTest - Android native unit tests. Useful for lifecycle unit testing, but no mocking is supported. They're slower, because they run in the emulator. Start: Run As -> Android JUnit Test in eclipse.

* OpenSatNav_JavaTests - JUnit tests. Support mocking through standard Java mocking framework (here chosen: mockito framework). Run in eclipse (not in the emulator) using JVM rather than Dalvik VM. Require android.jar, which is a compiled Android Java code. Faster.

Revision history for this message
droidguy (stan-berka) wrote :

1. Can you commit it to repository?

2. I have not added the Java unit test project yet, because I'm not sure whether I should include the libraries (mockito framework + android.jar) or let the developer download them from the internet when setting up the project in his/her machine.

Revision history for this message
chris_debian (cjhandrew) wrote :

I'm not sure of the implications for other developers, but in principle it sounds ok.

Thanks for the idea.

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

The SVN repository currently supports only one project (OSN), we need to change its layout with Enrique's Help, I'll try to contact him.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

Thanks ZeroG.
About the android.jar and mockito, I think they should go in the repo so it's as easy as possible to do the testing.

Revision history for this message
droidguy (stan-berka) wrote :

I agree, that it may require to move stuff in repository. Specifically, I would move the OSN eclipse project from root/trunk, down to root/trunk/main or something like this, and place the tests in root/trunk/test-android and root/trunk/test-junit.
This way, one can deliver a patch to the app project which will also contain new/updated tests. Also, this way the tests and the app changes can be committed in the same revision and checked out together easily. Is this what you were thinking?
droidguy

Revision history for this message
droidguy (stan-berka) wrote :

I'm attaching the JUnit test project with all libraries included.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.