- HTM-IT Server 1.6.1 or above
- Android 4.1+ / API 16+ ("JellyBean" or above)
- "Normal" screen size or higher
- "High Density (hdpi)" or better
See Android versions dashboard for more information:
The application was designed and tested on "Nexus 4".
-
Install Java JDK version 1.7 or higher from http://www.oracle.com/technetwork/java/javase/downloads/index.html
-
Install Android SDK from https://developer.android.com/sdk/index.html
-
Make sure to install the latest android SDK using the following command:
android update sdk -
The project is based on
gradleand the new Android Studio IDE. It will NOT work with the legacyeclipseIDE. You can downloaded Android Studio IDE from https://developer.android.com/sdk/installing/studio.html
-
Add
gradle.propertiesfile to your android folder with the following values:# Google Analytics Tracking ID systemProp.GA_TRACKING_ID = "UA-XXXXXXXX-X" # Email address to send user feedback systemProp.FEEDBACK_EMAIL = "support@domain.tld" # Initial version code to use in addition to 'gitCommitCount' systemProp.INITIAL_VERSION_CODE=1314
-
Add
local.propertiesfile to your android folder with the following values:sdk.dir=/your_path_to/adt-bundle-mac-x86_64-XXXXXXX/sdk -
This project includes the gradle wrapper so there is no need to install
gradleseparately. -
To build execute
gradlew build -
To test, launch the emulator first or plug your device in via USB, then execute:
gradlew -DSERVER_URL=??? -DSERVER_PASS=??? connectedCheck -
The test reports will be generated in build/outputs/reports folder:
android/build/htm-it-mobile/outputs/reports/androidTests/connected/index.html
Example Test Execution from Gradle:
gradlew -DSERVER_URL=https://htm-it.domain.tld -DSERVER_PASS=XXXXX connectedCheck
NOTE replace htm-it.domain.tld with the server IP or DNS entry of your HTM-IT instance and replace XXXXX with the API Key for that instance
-
You will have to install Maven from https://maven.apache.org/
-
You will have to set few environment variables:
# M2_HOME={path-to-apache-maven}/apache-maven-x.x.x # PATH=${PATH}:$M2_HOME/bin # M2=$M2_HOME/bin -
As functional tests run on saucelabs you will need username and key of saucelabs. Following environment variables should be set:
# SAUCE_USER_NAME=sauce-username # SAUCE_KEY=sauce-key -
The test reports will be generated in tests/behavioral/HtmItMobileApp/target/surefire-reports folder: htm-it-mobile/tests/behavioral/HtmItMobileApp/target/surefire-reports/testng-results.xml
Example Test Execution from Maven:
mvn install -D url="https://htm-it.domain.tld" -D pwd="XXXXX" -D deviceName="Android Emulator" -D version="4.4" -D sauceUserName=$SAUCE_USER_NAME -D sauceAccessKey=$SAUCE_KEY
NOTE replace htm-it.domain.tld with the server IP or DNS entry of your HTM-IT instance and replace XXXXX with the API Key for that instance.
deviceName you can select platform from here https://saucelabs.com/platforms/, this code is HTM-IT APK is tested on "Android Emulator" and "Google Nexus 7C Emulator".
version this is android version for the respective emulator
sauceUserName and sauceUserName as mentioned above.
In order to run the pipeline, ensure that following things are properly setup locally.
- You will require a running instance of HTM-IT for testing the mobile app.
- Below are three ways to achieve:
- Pass the region and 1.6.1 AMI-ID from the marketplace release to
run_pipelinescript. Script will take care of launching a HTM-IT instance. - Set up a bucket on S3. Create
stable_ami/ami.txtfile in the created bucket. URL will behttps://s3.amazonaws.com/<your-bucket-name>/stable_ami/ami.txt. Contents of ami.txt should beAMI_ID: ami-xxxxxxxx, whereami-xxxxxxxxshould be the AMI-ID. In this case you just need to pass region torun_pipelineand AMI-ID will be fetched byhttps://s3.amazonaws.com/<your-bucket-name>/stable_ami/ami.txt. Script will take care of launching a HTM-IT instance. NOTE: The code will read<your-bucket-name>from theS3_MAPPING_BUCKETenvironment variable - Pass --server-url https://htm-it.domain.tld --apikey to a valid, running instance of HTM-IT.
- Pass the region and 1.6.1 AMI-ID from the marketplace release to
- Ensure the Products repo is on your
PYTHONPATH - Run
pip install -r pipeline/requirements.txt - Your "Application Signing" keystore file must be located at
/etc/numenta/products/keys/htm-it.keystore. See mobile-core/android/common.gradle for ways to override the default location. ANDROID_HOMEenvironment variable should be set to the location of your Android SDK (alternatively, set this inlocal.properties)HTM_IT_MOBILE_HOMEenvironment variable should be set to the location ofhtm-it-mobilesources. E.g.:~/github/numenta/products/htm-it-mobileAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYenvironment variables must be setBUILD_PASSWORDenvironment variable must be set properly.- Run an Android device locally. You can get a list of devices using
android list avdand launch one usingemulator -avd <avd_name>