Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
93b9982
feat: v0 init commit
tanishkhot Feb 2, 2026
5f8f547
update: changes
tanishkhot Feb 10, 2026
5f47808
fix: chaning to server/health
tanishkhot Feb 10, 2026
b33cfd9
feat: support for json-testing (#1070)
tanishkhot Feb 23, 2026
5cbeef3
feat: add per-scenario credential resolution via env vars
tanishkhot Mar 5, 2026
8707f5f
feat: add custom failure message descriptions to assertion output (PA…
tanishkhot Mar 24, 2026
6b81628
feat: CI/CD readiness improvements for integration test framework
tanishkhot Mar 24, 2026
554ac30
fix: use composite key for Column asset matching in comparison engine
tanishkhot Mar 24, 2026
909c24f
style: fix trailing whitespace and import ordering from pre-commit
tanishkhot Mar 25, 2026
b621e58
feat: add metadata and config API types to integration test framework…
tanishkhot Mar 25, 2026
6bf0f74
feat: add pandera data validation to integration test framework (PART…
tanishkhot Mar 25, 2026
a9baa52
merge: bring feat/integration-tests up to date with main
tanishkhot Apr 2, 2026
a8a455a
fix: address 3 flaws from framework analysis report
tanishkhot Apr 2, 2026
d6d40b6
feat: add Claude skill /write-integration-tests for connector developers
tanishkhot Apr 2, 2026
aef1d9c
feat: add CI deployment templates, VPN guide, reference PRs, and merg…
tanishkhot Apr 2, 2026
f74bf9e
fix: add mandatory user prompt for branch protection at end of skill
tanishkhot Apr 2, 2026
59fdd71
Merge branch 'main' into feat/integration-tests
OnkarVO7 Apr 14, 2026
1a34462
Merge branch 'main' into feat/integration-tests
tanishkhot Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
627 changes: 627 additions & 0 deletions .claude/commands/write-integration-tests.md

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions application_sdk/test_utils/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
"""Integration testing framework for Apps-SDK.

This module provides a declarative, data-driven approach to integration testing.
Developers define test scenarios as data, and the framework handles everything:
credential loading, server discovery, test execution, and assertion validation.

Quick Start (zero boilerplate):

1. Set environment variables in .env:
ATLAN_APPLICATION_NAME=postgres
E2E_POSTGRES_USERNAME=user
E2E_POSTGRES_PASSWORD=pass
E2E_POSTGRES_HOST=localhost
E2E_POSTGRES_PORT=5432

2. Define scenarios and a test class:

>>> from application_sdk.test_utils.integration import (
... Scenario, BaseIntegrationTest, equals, exists, is_true, is_dict
... )
>>>
>>> class TestMyConnector(BaseIntegrationTest):
... scenarios = [
... Scenario(
... name="auth_works",
... api="auth",
... assert_that={"success": equals(True)},
... ),
... Scenario(
... name="auth_fails",
... api="auth",
... credentials={"username": "bad", "password": "wrong"},
... assert_that={"success": equals(False)},
... ),
... Scenario(
... name="preflight_works",
... api="preflight",
... metadata={"include-filter": '{"^mydb$": ["^public$"]}'},
... assert_that={"success": equals(True), "data": is_dict()},
... ),
... ]

3. Run: pytest tests/integration/ -v

That's it! Credentials are auto-loaded from E2E_* env vars.
Server URL is auto-discovered from ATLAN_APP_HTTP_HOST/PORT.
Each scenario becomes its own pytest test.

Supported APIs:
- auth: Test authentication (/workflows/v1/auth)
- metadata: Fetch metadata (/workflows/v1/metadata)
- preflight: Preflight checks (/workflows/v1/check)
- workflow: Start workflow (/workflows/v1/{endpoint})
- config: Get/update workflow config (/workflows/v1/config/{id})

For detailed documentation, see:
docs/docs/guides/integration-testing.md
"""

# =============================================================================
# Models
# =============================================================================

from .assertions import ( # Basic assertions; Collection assertions; Numeric assertions; String assertions; Type assertions; Combinators; Custom
all_of,
any_of,
between,
contains,
custom,
ends_with,
equals,
exists,
greater_than,
greater_than_or_equal,
has_length,
is_dict,
is_empty,
is_false,
is_list,
is_none,
is_not_empty,
is_string,
is_true,
is_type,
less_than,
less_than_or_equal,
matches,
none_of,
not_contains,
not_equals,
not_one_of,
one_of,
starts_with,
)
from .client import IntegrationTestClient
from .comparison import (
AssetDiff,
GapReport,
compare_metadata,
load_actual_output,
load_expected_data,
)
from .lazy import Lazy, evaluate_if_lazy, is_lazy, lazy
from .models import APIType, Scenario, ScenarioResult
from .runner import BaseIntegrationTest, generate_test_methods, parametrize_scenarios
from .validation import (
format_validation_report,
get_normalised_dataframe,
get_schema_file_paths,
validate_with_pandera,
)

# =============================================================================
# Public API
# =============================================================================

__all__ = [
# Models
"APIType",
"Scenario",
"ScenarioResult",
# Lazy evaluation
"Lazy",
"lazy",
"is_lazy",
"evaluate_if_lazy",
# Assertions - Basic
"equals",
"not_equals",
"exists",
"is_none",
"is_true",
"is_false",
# Assertions - Collections
"one_of",
"not_one_of",
"contains",
"not_contains",
"has_length",
"is_empty",
"is_not_empty",
# Assertions - Numeric
"greater_than",
"greater_than_or_equal",
"less_than",
"less_than_or_equal",
"between",
# Assertions - String
"matches",
"starts_with",
"ends_with",
# Assertions - Type
"is_type",
"is_dict",
"is_list",
"is_string",
# Assertions - Combinators
"all_of",
"any_of",
"none_of",
"custom",
# Metadata Comparison
"AssetDiff",
"GapReport",
"compare_metadata",
"load_actual_output",
"load_expected_data",
# Client
"IntegrationTestClient",
# Runner
"BaseIntegrationTest",
"generate_test_methods",
"parametrize_scenarios",
# Data Validation (Pandera)
"validate_with_pandera",
"format_validation_report",
"get_normalised_dataframe",
"get_schema_file_paths",
]
Loading
Loading