diff --git a/docs/developer-guide.md b/docs/developer-guide.md index d3f2c4072adfa2d4efa5b05f89775229bb6a35ca..240da01681f881a8aeb3dd087a75e73d8a6c8082 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -7,7 +7,8 @@ This page gives insights on extending Aura Engine internals or through the API. - [Aura Engine Development Guide](#aura-engine-development-guide) - [AURA Componentes](#aura-componentes) - [Engine Components](#engine-components) - - [Running Engine for Development](#running-engine-for-development) + - [Running for Development](#running-for-development) + - [Testing](#testing) - [API](#api) - [Scheduler](#scheduler) - [Docker](#docker) @@ -46,7 +47,7 @@ There's a convenience script to start all of the three main dependencies (Steeri *...TBD...* -## Running Engine for Development +## Running for Development Ensure you have following other projects up and running: @@ -70,6 +71,14 @@ Now start Liquidsoap which is part of Engine Core: If your IDE of choice is *Visual Studio Code*, then there are launch settings provided in `.vscode/launch.json`. +## Testing + +Test cases are located in `./tests`. The test command expects a virtual environment in `./python` which gets activated automatically as soon you run the tests with + +```shell +~/code/aura/engine$ ./run.sh test +``` + ## API You can find the AURA API definition here: https://gitlab.servus.at/autoradio/meta/blob/master/api-definition.md diff --git a/run.sh b/run.sh index b151e67177aa7a37f65f569e21ba209a73e48358..c4f93505e7b4e437a4a6c45463405ad421b1c289 100755 --- a/run.sh +++ b/run.sh @@ -57,7 +57,9 @@ if [[ $docker == "false" ]]; then ### Runs Tests ### if [[ $mode == "test" ]]; then - /usr/bin/env $PYTHON_EXEC -m unittest discover tests + source python/bin/activate + echo "Running Engine Tests in Python Environment ($(python3 -V))" + python -m unittest discover tests fi ### CAUTION: This deletes everything in your database ###