-
Notifications
You must be signed in to change notification settings - Fork 3
Setup for Android app
msporna edited this page Jan 8, 2019
·
4 revisions
This page lists steps required to make LAVA work with Android (Java).
- Do the initial setup: https://github.com/msporna/LAVA-test-coverage/wiki/Initial-setup or skip if done already
- copy 'lava' folder from LAVA project root/helpers/android_helper into your project's src
- open 'LavaCoverageHelper.java' and:
- replace [YOUR PACKAGE NAME HERE] with your package name
- set your LAVA host name in '_LavaUrl' variable
- open 'LavaCoverageHelper.java' and:
- Open client/config.json and update required fields:
source_root_absolute_path: [absolute path to /src folder of Android project]
android_lava_helper_namespace: [namespace pointing to Lava Helper's 'lava' folder within your project - used to import LavaHelper into other classes]
INJECT_MODE: "android"
All paths must be absolute. For config details go to config.json-explained page.
- start LAVA server from /server folder by executing the following command manually:
python instrument_server.py
or if you are on Windows you can simply run:
run_api_windows.bat
-
go to /client folder and from your terminal run
python instrument_client.py
and pass config.json path as command line argument so the command becomes:python instrument_client.py config.json
-
the process of injecting probes will start
-
check your project's source files, should be appended by instrumentation code
-
your Android project is ready for getting the coverage - don't forget to build your app (it will be built along with injected probes code lines)
related example: https://github.com/msporna/LAVA-test-coverage/tree/master/examples/android_demo
- How it works
- Initial setup
- Setup for Unity game
- Setup for Android app
- Setup for javascript
- Setup for Angular app
- GETTING THE COVERAGE
- Getting coverage for build (multiple coverage sessions consolidated
- Setup modules
- Managing tags
- Managing users
- Create and End test session automatically (CI)
- Instrumenting code on every iteration
- Coverage report explained
- Accessing latest report
- How to interpret covered lines report
- Config explained
- Settings
- Send custom values along with line statistics
- Examples
- Extended-CI-use-case
- Troubleshooting