/test - Smart Test Runner
Run the appropriate tests based on what changed or what the user specifies.
Usage
- •
/test- Run all unit tests - •
/test unit- Run Rust unit tests only - •
/test e2e- Run Python E2E tests - •
/test functions- Run Python function tests - •
/test mvcc- Run MVCC tests - •
/test concurrency- Run concurrency tests - •
/test tck- Run all passing TCK tests - •
/test tck <path>- Run specific TCK feature tests - •
/test flow- Run all flow tests
Instructions
When the user invokes /test, determine which tests to run:
Environment Setup: First, determine the correct Python virtual environment path:
- •Inside devcontainer:
/data/venv - •Outside devcontainer:
venv
Check if /data/venv exists to detect devcontainer:
if [ -d "/data/venv" ]; then VENV_PATH="/data/venv" else VENV_PATH="venv" fi
- •
Unit tests (default): Run Rust unit tests
bashcargo test -p graph
- •
E2E tests: Run Python end-to-end tests
bashsource $VENV_PATH/bin/activate && pytest tests/test_e2e.py -vv
- •
Function tests: Run Python function tests
bashsource $VENV_PATH/bin/activate && pytest tests/test_functions.py -vv
- •
MVCC tests: Run MVCC concurrency tests
bashsource $VENV_PATH/bin/activate && pytest tests/test_mvcc.py -vv
- •
Concurrency tests: Run concurrency tests
bashsource $VENV_PATH/bin/activate && pytest tests/test_concurrency.py -vv
- •
TCK tests: Run Technology Compatibility Kit tests for Cypher language compliance
- •All passing TCK tests (no path argument):
bash
source $VENV_PATH/bin/activate && TCK_DONE=tck_done.txt pytest tests/tck/test_tck.py -s
- •Specific feature tests (with path argument):
bash
source $VENV_PATH/bin/activate && TCK_INCLUDE=<path> pytest tests/tck/test_tck.py -s
Common TCK paths:
- •
tests/tck/features/expressions/list- List expression tests - •
tests/tck/features/expressions/map- Map expression tests - •
tests/tck/features/clauses/match- MATCH clause tests - •
tests/tck/features/clauses/return- RETURN clause tests
Notes:
- •TCK tests verify Cypher language compliance against the openCypher spec
- •
tck_done.txtcontains the list of passing test scenarios
- •All passing TCK tests (no path argument):
- •
Flow tests: Run the flow test suite which tests query flows against the running database
bash./flow.sh
Important: The project must be compiled in debug mode (
cargo build) before running flow tests.Notes:
- •Flow tests are located in
tests/flow/directory - •These tests verify complete query execution flows
- •Progress is tracked in
flow_tests_done.txtandflow_tests_todo.txt - •This skill automatically detects and uses the correct venv path
- •Flow tests are located in
If no argument is provided, run the Rust unit tests (cargo test -p graph).
If tests fail, analyze the output and help the user understand what went wrong.