At least Clang 7.0 and Clant-tidy 7.0 is required to run the tests.
Before running the tests the CodeChecker package needs to be built!
# Build the package make package
||run all tests (unit and functional)|
||functional tests (SQLite and PostgreSQL)|
||functional test (SQLite)|
||functional tests (PostgreSQL)|
||run only a specific test (SQLite)|
Clean test workspace
Run tests with PostgreSQL
At least one of the database drivers needs to be available to use the PostgreSQL database backend.
psycopg2 is used by default if not found
pg8000 is used.
.noserc configuration file in the repository root is used to configure running the tests:
Further configuration options can be found here Nosetest usage.
Virtual environment to run tests
Test running virtual environment is automatically created and sourced by the
make test* commands.
Create a python virtualenv for development:
Create new unit test
Use the add_new_unit_test.py script to generate new test files.
Add new tests for the created
tests/unit/test_module_name.py filee and run the unit tests:
Create new functional test
Use the add_new_func_test.py script to generate new test files.
From the repository root run the new test template (should pass):
make TEST="tests/functional/mynewfeature" run_test
In each functional test
mynewfeature/__init__.py is doing the functional test setup:
- exporting test related data to the test directories - analyzing a test project (multiple times if needed) - start a server connected to a specific database (should be stopped in teardown) - prepare and cleanup the test workspace - ...
Add new functional testcase
The actual test cases go to
The setup part of these test read up the generated test configuration file by
Test cases should only use test related configuration values
ONLY from the configuration file
generated by the
The tests should
ONLY modify the files in the workspace provided for them.
Test cases can: - rerun the analysis - connect to the server started by the
- run command line commands
- modify configuration files