Testing Overview¶
The ArcadeDB Python bindings have a comprehensive test suite covering all major functionality.
Quick Statistics¶
Test Results
- Current package: ✅ 252 passed, 0 skipped
- All features available (SQL, OpenCypher, Studio UI, Vector search)
Total: 252 tests + 7 examples across all platforms, 100% passing
What's Tested¶
The test suite covers:
- ✅ Core database operations - CRUD, transactions, queries
- ✅ Server mode - HTTP API, multi-client access
- ✅ Concurrency patterns - File locking, thread safety, multi-process
- ✅ Graph operations - Vertices, edges, traversals
- ✅ Query languages - SQL, OpenCypher
- ✅ Vector search - HNSW (JVector) based Vector indexes, similarity search
- ✅ Data import - CSV with batch commits and type inference
- ✅ Unicode support - International characters, emoji
- ✅ Schema introspection - Querying database metadata
- ✅ Type conversions - Python/Java type mapping
- ✅ Large datasets - Handling 1000+ records efficiently
Quick Start¶
Install Test Dependencies¶
Run All Tests¶
# From the bindings/python directory
pytest
# With verbose output
pytest -v
# With coverage report
pytest --cov=arcadedb_embedded --cov-report=html
Run Specific Tests¶
# Run a specific test file
pytest tests/test_core.py
# Run a specific test function
pytest tests/test_core.py::test_database_creation
# Run tests matching a keyword
pytest -k "transaction"
pytest -k "server"
pytest -k "concurrency"
# Run with output (see print statements)
pytest -v -s
Test Files Overview¶
| Test File | Tests | Description |
|---|---|---|
test_core.py |
13 | Core database operations, CRUD, transactions, queries |
test_server.py |
6 | Server mode, HTTP API, configuration |
test_concurrency.py |
4 | File locking, thread safety, multi-process behavior |
test_server_patterns.py |
4 | Best practices for embedded + server mode |
test_importer.py |
16 | CSV import with type inference |
test_cypher.py |
1 | OpenCypher query language |
Common Testing Workflows¶
Development Workflow¶
# Watch mode - rerun tests on file changes
pytest --watch
# Run only failed tests from last run
pytest --lf
# Run tests in parallel (faster)
pytest -n auto
Debugging Tests¶
# Stop on first failure
pytest -x
# Drop into debugger on failure
pytest --pdb
# Show local variables on failure
pytest -l
# Verbose with full output
pytest -vv -s
Test Markers¶
Tests are organized with pytest markers:
# Run only server tests
pytest -m server
# Run only OpenCypher tests
pytest -k cypher
# Run all except slow tests
pytest -m "not slow"
Expected Output¶
When all tests pass, you should see:
Next Steps¶
- New to testing? Start with Core Tests
- Using server mode? See Server Tests and Server Patterns
- Confused about concurrency? Read Concurrency Tests
- Importing data? Check Data Import Tests
- Using OpenCypher? See OpenCypher Tests
Related Documentation¶
- API Reference - Database API documentation
- User Guide - Database usage guide
- Contributing - How to contribute to the project
- Best Practices - Testing best practices