blob: 459f4634bd1b452a5c7e81ef90359673b6727c60 [file] [log] [blame] [view] [edit]
# Local Agent Tests
This folder contains unit tests for Local Agent.
You'll have to install the extra packages to run the tests:
```
$ source <venv-name>/bin/activate
$ cd /path/to/{repo-base}/local-agent
$ pip install .[test]
```
## Unit Test
Run all the unit tests and show the coverage report.
1. Activate the virtual environment.
2. Execute the coverage tool:
```
cd /path/to/{repo-base}/local-agent/local_agent/tests/unit_tests/
coverage run --source={LOCAL_AGENT_PACKAGE_PATH}/local_agent/ -m unittest discover && coverage report
```
where {LOCAL_AGENT_PACKAGE_PATH} can be obtained by the following command:
```
$ pip show local-agent | grep -e "^Location" | awk -F " " '{print $2}'
```