Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.
The "RunningTests" page has been changed by AndrewGrieve: http://wiki.apache.org/cordova/RunningTests?action=diff&rev1=14&rev2=15 4. Compare the number of failing tests. 5. Rinse and repeat until you get the same (or possibly even less!) number of tests failing. - == Testing Cordova on Android (Post Cordova View) == + == Running Unit Test == - Cordova on Android uses JUnit to run numerous tests on the Android Framework. It is recommended that if any changes are made to Cordova that these tests would be run. These tests can be run on Eclipse or on the Command Line. To run these tests from the command line run the following command in the framework directory with a device attached or emulator running: + === On Android === - ant debug install - adb shell am instrument -w org.apache.cordova.test/android.test.InstrumentationTestRunner + Pre-steps for both command line and Eclipse: + 1. Ensure an emulator or device is running. + 1. Navigate to the /test directory + 1. Run: + {{{ + android update project -p . -t android-16 --subprojects + }}} - This will go through all the current tests that are written for the Android version of Cordova. Please note that these tests assume that you are running Jasmine and a modified Mobile-Spec in the assets/www directory of the Android project itself. + Running from command line: + {{{ + ant debug install + adb shell am instrument -w org.apache.cordova.test/android.test.InstrumentationTestRunner + }}} - To run these in Eclipse, first run the test project on the device by right clicking the project, and selecting Run As -> Android Project. Then once it's deployed, right click on the project and select Run As -> Android JUnit Project. + Running from within Eclipse: + 1. File -> New -> Android Project from Existing Code + 1. Select the /test directory + 1. Right click the project, and select Debug As -> Android Project + 1. Right click the project, and select Debug As -> Android JUnit Project. == Testing the Native Plugin API ==
