-
Notifications
You must be signed in to change notification settings - Fork 3
Setup for Angular app
** ANGULAR IS NO LONGER SUPPORTED SINCE VERSION 3 **
This page lists steps required to make LAVA work with Angular project written in typescript.
- Do the initial setup: https://github.com/msporna/LAVA-test-coverage/wiki/Initial-setup
- Open src/config.json and update required fields:
source_root_absolute_path: [absolute path to /src folder]
web_routes_available: [list routes that can be visited by end user]
angular_main_file_name: [usually main.ts / just a filename not the path]
INJECT_MODE: "angular"
All paths must be absolute. For config details go to config.json-explained page.
- start LAVA server from /dashboard 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 files, should be appended by instrumentation code
-
your app's source folder will have instrument.js file (and index.html will be referencing it-done automatically) and lava_code_coverage folder
-
compile .ts code by running 'npm run build' - make sure you are running the latest node and npm
-
manually copy instrument.js and lava_test_coverage folder to the dist folder created during compilation
-
deploy dist to desired web server (there is a Python web server in Lava root/examples/angular_demo)
related example: https://github.com/msporna/LAVA-test-coverage/tree/master/examples/angular_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