Skip to main content
Version: Cloud

Testing Connectors

Multiple tests suites compose the Airbyte connector testing pyramid

Tests run by our CI pipeline​

  • Connector QA Checks: Static asset checks that validate that a connector is correctly packaged to be successfully released to production.
  • Unit Tests: Connector-specific tests written by the connector developer which don’t require access to the source/destination.
  • Integration Tests: Connector-specific tests written by the connector developer which may require access to the source/destination.
  • Connector Acceptance Tests: Connector-agnostic tests that verify that a connector adheres to the Airbyte protocol. Credentials to a source/destination sandbox account are required.
  • Regression Tests (deprecated): Connector-agnostic tests that verified the behavior of a connector between versions. Previously available for API source connectors.

πŸ€– CI​

CI will run all the tests that are available for a connector. This can include all of the tests listed above, if we have the appropriate credentials. At a minimum, it will include the Connector QA checks and any tests that exist in a connector's unit_tests and integration_tests directories. To run Connector Acceptance tests locally, you must provide connector configuration as a config.json file in a .secrets folder in the connector code directory.

Connector tests are automatically and remotely triggered on your branch according to the changes made in your branch. Passing tests are required to merge a connector pull request.

Connector specific tests​

🐍 Python connectors​

We use pytest to run unit and integration tests:

# From connector directory
poetry run pytest

β˜• Java connectors​

warning

Airbyte is revamping its core Java destinations codebase. We're not reviewing/accepting new Java connectors at this time.

We run Java connector tests with gradle.

# Unit tests
./gradlew :airbyte-integrations:connectors:source-postgres:test
# Integration tests
./gradlew :airbyte-integrations:connectors:source-postgres:integrationTestJava

Please note that according to the test implementation you might have to provide connector configurations as a config.json file in a .secrets folder in the connector code directory.