Testing Guide¶
Comprehensive testing documentation for ArcadeDB Python bindings.
Test Coverage
252 tests across 6 test files, 100% passing
- Current package: 252 passed, 0 skipped
- All ArcadeDB features working (SQL, OpenCypher, Studio)
Quick Navigation¶
-
Quick start, statistics, and how to run tests
-
CRUD, transactions, queries, graph operations (13 tests)
-
HTTP API, Studio, configuration (6 tests)
-
File locking, thread safety, multi-process (4 tests)
-
Embedded + HTTP best practices (4 tests)
-
CSV import with type inference (16 tests)
-
Graph traversal language (1 test)
-
Summary of recommended patterns and practices
Quick Start¶
Installation¶
Running Tests¶
# Run all tests
pytest
# Run specific category
pytest tests/test_core.py -v
pytest tests/test_concurrency.py -v
# Run with coverage
pytest --cov=arcadedb_embedded --cov-report=html
Test Coverage Summary¶
| Category | What's Tested |
|---|---|
| Core Operations | CRUD, transactions, queries, graph operations, vector search |
| Server Mode | HTTP API, Studio UI, configuration, multiple databases |
| Concurrency | File locking, thread safety, multi-process limitations |
| Server Patterns | Embedded+HTTP combinations, lock management |
| Data Import | CSV with type inference, batch commits |
| Query Languages | SQL, OpenCypher |
| Advanced Features | Unicode support, schema introspection, large datasets |
Key Concepts¶
Concurrency Model¶
Can multiple Python instances access the same database?
- ❌ Multiple processes cannot (file lock prevents it)
- ✅ Multiple threads can (thread-safe within same process)
- ✅ Use server mode for true multi-process access
See Concurrency Tests for details.
Server Access Patterns¶
Two ways to combine embedded + HTTP access:
- Pattern 1: Embedded First → Server (requires manual
close()) - Pattern 2: Server First → Create (recommended, simpler)
See Server Patterns for detailed comparison.
Performance Insight¶
No HTTP Overhead
Embedded access through server is just as fast as standalone embedded mode!
It's a direct JVM call, not HTTP. Same Python process = zero network overhead.
Common Testing Workflows¶
Development¶
# Run tests matching keyword
pytest -k "transaction" -v
pytest -k "import" -v
# Stop on first failure
pytest -x
# Drop into debugger on failure
pytest --pdb
Show skipped test reasons¶
pytest -v -rs
tests/ ├── test_core.py # Core operations (13 tests) ├── test_server.py # Server mode (6 tests) ├── test_concurrency.py # Concurrency (4 tests) ├── test_server_patterns.py # Patterns (4 tests) ├── test_importer.py # Import (13 tests) ├── test_cypher.py # OpenCypher (tests) └── conftest.py # Shared fixtures ```Next Steps¶
New to testing? Start with Overview
Working with databases? See Core Tests
Need multi-process access? Read Concurrency Tests
Setting up a server? Check Server Patterns
Importing data? See Data Import Tests
Want best practices? Read Best Practices Summary