---
title: Testing guide for pgvectorscale | Tiger Data Docs
description: pgvectorscale has two main types of tests:
---

# Testing guide for pgvectorscale

pgvectorscale has two main types of tests:

1. **Rust Tests** - Using PGRX’s `#[pg_test]` framework (can be in any source file)
2. **Python Tests** - Using pytest for multi-process concurrency testing

## Rust tests

Terminal window

```
# Run all Rust tests
cd pgvectorscale && cargo pgrx test pg17


# Run specific test
cd pgvectorscale && cargo pgrx test pg17 test_name
```

## Python tests

Terminal window

```
# Setup (creates .venv virtual environment)
make test-python-setup


# Run all Python tests
make test-python


# Run specific categories
pytest tests/ -m concurrency -v    # Multi-process concurrency tests
pytest tests/ -m integration -v    # Basic integration tests


# For PGRX development (custom port)
DB_PORT=28817 ./scripts/run-python-tests.sh
```

### Test markers

- `@pytest.mark.concurrency` - Multi-process concurrency tests
- `@pytest.mark.integration` - Basic integration tests

### Prerequisites

For PGRX development:

Terminal window

```
cd pgvectorscale && cargo pgrx start pg17
cargo pgrx install --features pg17
```
