tree: a84257ddd6c9122faed331d45cc0436123795ea7 [path history] [tgz]
  1. unit_tests/
  2. README.md
local_agent/tests/README.md

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