| # 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}' |
| ``` |