-
Notifications
You must be signed in to change notification settings - Fork 3
Setup for Unity game
This page lists steps required to make LAVA work with C# Unity games
- Do the initial setup: https://github.com/msporna/LAVA-test-coverage/wiki/Initial-setup or skip if done already
- Open client/config.json and update required fields:
source_root_absolute_path: [absolute path to the Scripts folder within the project]
INJECT_MODE: "unity"
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
-
copy LavaTestCoverage folder from LAVA project_root/helpers/unity_plugin into your project/Assets/Plugins
-
go to /client folder and from your terminal run
python instrument_client.pyand 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
-
there is a LavaTestCoverageGameObject located in Plugins/LavaTestCoverage/LavaHelper/ - Add it to each scene you are testing.
-
your game is now ready to be tested and coverage stats will be gathered - don't forget to build your game (it will be built along with injected probes code lines)
related example: https://github.com/msporna/LAVA-test-coverage/tree/master/examples/unity_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