Clone this wiki locally
Testing suite for SDK version 3.0 (This documentation is specific to testing 3.x versions of the SDK. Documentation for testing 2.x is currently not supported). Tests the following components.
- On-BUG module/API testing.
- Dragonfly Eclipse/UI testing.
On-BUG module/API testing
Testing of the BUG modules and their respective APIs relies on the use of the BlueBack testing package. BlueBack makes use of some of the low-level capabilities of JUnit and the dependent Hamcrest library.
In order to install BlueBack and the on-BUG module testing suite, please follow these steps. Note that you must have a BUG with a 3.0-compatible rootfs.
#from your respective git directory on your dev machine git clone firstname.lastname@example.org:buglabs/sdk-test.git cd sdk-test git checkout sdk-test-3.0 scp OSGi-Compatible-Jars/* root@YOUR_3.0_BUG:/usr/share/osgi/bundle scp com.buglabs.bug.module.* root@YOUR_3.0_BUG:/usr/share/osgi/bundle scp com.buglabs.bug.blueback root@YOUR_3.0_BUG:/usr/share/osgi/apps #from your BUG /etc/init.d/knapsack stop /etc/init.d/knapsack start
Running the tests
In order to run the tests, ensure that you have first completed the installation steps above. Again, you must be using a 3.0-compatible rootfs to use this package. After installation, follow the steps below.
- Tail felix.log to observe test results
#on your BUG tail -f /var/log/felix.log
- From the BUG's appui, select the test bundle(s) of your choice (GPS, Camera, LCD) and start them. (Observe that felix.log registers the services associated with the test bundle)
- From the BUG's appui, select the BlueBack bundle and start it. (Observe that felix.log registers the BlueBack service)
- Observe felix.log and the test results will print.
Dragonfly Eclipse/UI testing
The Dragonfly Eclipse/UI testing portion of this package is still a work in progress. To run this testing package follow the steps below.
- Open Eclipse and ensure that you are in the Dragonfly 3.0 perspective (update site - http://www.buglabs.net/sdk/testing/3.0.0.v201108051801_T/updatesite/)
- Ensure you have the SWTBot plugin installed (update site - http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site)
- Import the com.buglabs.bug.dragonfly.uitests project from git into your current workspace
- Right click the com.buglabs.bug.dragonfly.uitests project and select 'Run As > SWTBot Test'
- The test will begin. Be sure to not use your mouse or keyboard while the tests are running. A JUnit printout of your test results will be viewable in your current workspace.