Skip to content

Testing

GitHub Actions

The project uses GitHub Actions to run tests automatically on every push and pull request. The workflow is defined in .github/workflows/test-sse.yml. It includes steps to:

  • Set up the environment
  • Install dependencies
  • Run tests for the service
  • Generate and upload code coverage reports in artifacts and upload it to Github Pages when the branch is develop

When the deploying GitHub Action is triggered, it will automatically run the tests and deploy only if the tests pass.

The published code coverage report can be accessed at:

SSE Coverage report

Run tests locally

To run the tests locally, you can use the following commands:

First, start the backend server:

docker compose up --build

Then, run the tests for the service:

SSE

# Install the tests dependencies
pip install -r ./sse_server/tests/requirements.txt

# Run the tests
python3 ./sse_server/tests/test_main.py