- Clone/download Grafite github repository.
- Create a project for the Grafite app in Firebase console
- Make a note of the project id, it is different from the project name that yout type in and is auto-generated. It will be needed in step C.
-
Upon successful creation of the project, you will land on the project dashboard. Click "Add Firebase to your Android App".
-
Specify
com.primedroid.grafite
as the package name while adding the app: -
You can click
Next
until you reach the verification step and the skip the verification step to go back to the project dasboard. The dashboard should now show the app you just registered.
- Install gcloud - https://cloud.google.com/sdk/docs/downloads-interactive
- Set the gcloud project to the Firebase project created in step A3 using
gcloud config set project
project_id_for_firebase_project. Alternately, you can view all projects usinggcloud projects list
and get the project id.
- Go to gcloud console on web to create a new bucket. Make sure you are still in the same project created in step A. (more information about buckets here - https://cloud.google.com/storage/docs/creating-buckets). You will need a credit card to create a bucket.
- Specify this bucket in the config.properties file in the
grafite
android app project that you have cloned/downloaded from this repository. - Specify this bucket for BUCKET_NAME in misc/flank.sh in the
grafite
android app project that you have cloned/downloaded from this repository.
Run the following from the root of the project:
-
./gradlew testDebugUnitTest
- This creates the raw unit test coverage reports for the app and model modules. You should have testDebugUnitTest.exec in thebuild/reports
folder. -
./scripts/apks_for_testing.sh
- This creates theapks
which are required for uploading to Firebase test lab. -
./scripts/flank.sh
- This script will upload the apks and run the tests on Firebase testlab. Subsequent runs will use sharding. Also, after successfully passing the test, it will dowload the instrumentation test coverage reports from firebase into theapp/coverage_reports
folder. -
./gradlew unifiedTestReport
- This script creates the coverage report for the grafite project. It includes the unit and instrumentation test coverage reports, while creating the unified reports.
If everything works well, the html report at Grafite/build/reports/jacoco/unifiedTestReport/html/index.html
, should look like this: