Skip to content

Tests

SEEREP uses GoogleTest for C++ Unit Tests and pytest for integration tests. Unit tests are placed into the individual ROS packages while the intregation tests are setup in the /test directory. The tests run automatically as a GitHub Action with every push.

C++ Unit Tests

Currently unit tests are set up for:

Using catkin

To run the tests with catkin use:

catkin test # run all availabe tests
catkin test <specific-package> # run all tests from a specific package

Python Integration Tests

The integration tests, based on the Python examples, cover most of the send and receive operations of SEEREP.

Using pytest

To run all integration tests use:

pytest

in the main repository directory.

To execute a subset of the integration tests use:

# Recursively executes all tests in the meta directory
pytest tests/python/gRPC/meta

# Same execution as above
cd tests/python/gRPC/meta
pytest

# Run all tests specified in this file
pytest tests/python/gRPC/meta/test_gRPC_pb_projectCreation.py

Testing through VSCode

Another way to run the tests is through the VSCode Testing Tab ( icon)

Info

With a fresh installation of the project, the test cases might not be recognized. To resolve this, use the button in the top menu to refresh.

To run the tests use the button at the top or select individual test cases to run.

VS-Code Test Explorer

Sucessfull run all of tests using the VS-Code test explorer