You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following a conversation with @aaronsteers, this issue proposes incrementally migrating CAT tests from the monorepo to the Python CDK. This will enable running tests directly against Python classes/functions without requiring Docker containers, for better debugging. This will also enable running via docker or via CLI, for non-Python sources, and will support Yaml-based sources, including those with custom components.py files.
Tests should be runnable via CLI and/or Docker (for parity with CAT today), and should also be runnable as a pytest suite, for more control and faster debug iteration loops.
Current Test Categories
Connector Acceptance Test (CAT) Checklist
This file tracks all the tests implemented in the CAT framework.
Test Files to Examine:
test_incremental.py
test_full_refresh.py
test_core.py
Test Categories:
1. Specification Tests (test_core.py TestSpec)
Configuration Schema Validation
Validates connector configuration against JSON schema
Checks enum usage and uniqueness
Validates oneOf usage in specs
Tests required vs optional fields
Validates property types and formats
Checks date patterns and formats
Secret Handling
Verifies proper marking of secret fields
Ensures secrets never appear in outputs
Validates OAuth flow parameters
Tests OAuth as default auth method
Schema Validation
Checks property types (no arrays at root)
Validates object structures
Ensures backward compatibility
Verifies additional properties handling
2. Connection Tests (test_core.py TestConnection)
Basic Connection Check
Tests successful connection scenarios
Validates error handling
Verifies connection status messages
3. Discovery Tests (test_core.py TestDiscovery)
Catalog Structure
Verifies stream discovery
Validates JSON schemas
Ensures unique stream names
Checks cursor field definitions
Validates primary key existence
Schema Compatibility
Tests backward compatibility
Validates supported data types
Checks sync mode support
Verifies primary key data types
4. Basic Read Tests (test_core.py TestBasicRead)
Record Validation
Checks record structure against schema
Validates data types and formats
Verifies required fields presence
Tests empty streams handling
Stream Status
Validates stream status messages
Checks status progression (STARTED → RUNNING → COMPLETE)
Overview
Following a conversation with @aaronsteers, this issue proposes incrementally migrating CAT tests from the monorepo to the Python CDK. This will enable running tests directly against Python classes/functions without requiring Docker containers, for better debugging. This will also enable running via docker or via CLI, for non-Python sources, and will support Yaml-based sources, including those with custom
components.py
files.Tests should be runnable via CLI and/or Docker (for parity with CAT today), and should also be runnable as a pytest suite, for more control and faster debug iteration loops.
Current Test Categories
Connector Acceptance Test (CAT) Checklist
This file tracks all the tests implemented in the CAT framework.
Test Files to Examine:
Test Categories:
1. Specification Tests (test_core.py TestSpec)
Configuration Schema Validation
Secret Handling
Schema Validation
2. Connection Tests (test_core.py TestConnection)
3. Discovery Tests (test_core.py TestDiscovery)
Catalog Structure
Schema Compatibility
4. Basic Read Tests (test_core.py TestBasicRead)
Record Validation
Stream Status
Error Handling
5. Full Refresh Tests (test_full_refresh.py)
6. Incremental Sync Tests (test_incremental.py)
State Management
Record Processing
7. Connector Attributes Tests (test_core.py TestConnectorAttributes)
8. Documentation Tests (test_core.py TestConnectorDocumentation)
Key Implementation Considerations for CDK:
Modular Test Framework
Environment Management
State Handling
Schema Validation
Migration Strategy
Phase 1: Core Validation Layer
Phase 2: Test Infrastructure
Phase 3: State Management
Phase 4: Container Abstraction
Benefits
Implementation Notes
/cc @aaronsteers
Related spike from a couple quarters ago:
The text was updated successfully, but these errors were encountered: