-
Notifications
You must be signed in to change notification settings - Fork 9
Add a new test
Once the new test has been added to the Google Sheet, create the json files by using the Custom Utilities
scripts.
-
Generate the dashboard JSON:
Export Dashboard JSON
Paste the contents of the popup into a file calledcaddisfly-tests-v2-dev.json
Upload this file to s3 public bucket using the admin account. akvoflow-dev2 is the only instance that uses this file, most of the other instances usecaddisfly-tests-v2.json
. You can now create a survey with your new tests and download them to your app. -
Generate the caddisfly app's JSON:
Export tests JSON
Replace the contents of the appssrc/main/assets/tests.json
by this one. Add drawable/images if required. Add strings to the correct strings file. Strings can be found in theInstruction Text
sheet tab. -
Run the Android UI Tests with the screenshot option "on" on a real device.
buildConfigField "Boolean", "TAKE_SCREENSHOTS", "true"
./gradlew connectedMainExtInspectAndroidTest
you can also run specific tests, for example:
./gradlew connectedMainExtInspectAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=org.akvo.caddisfly.instruction.ManualInstructionsTest#manual_AllInstructions
If the tests succeed pull the screenshots from the device:
adb pull sdcard/Akvo\ Caddisfly/screenshots .
resize the screenshots, for example in Linux this can be easily done with this command:
mogrify -resize 250x444 *.png
Clone the akvo-caddisfly-screenshots repo and paste the screenshots inside the correct language folder, then push to have the site updated with the new screenshots.
- If you want to test how your test behaves and see all the instructions without having an external device like the MD610, it is possible to enable the diagnostics mode by tapping the version number at least 10 times in the About Screen.
You can then start your test instructions with:
adb shell am start -a android.intent.action.VIEW -d "akvo://caddisfly?id=2456d482-dbec-466c-8387-411a4093f6b6" org.akvo.caddisfly