1
0
mirror of synced 2025-12-22 19:38:29 -05:00
Files
airbyte/docs/connector-development/config-based/tutorial/6-testing.md
Joe Reuter 6a10ae3e05 Rename source acceptance test to connector acceptance test (#21846)
Rename source acceptance test to connector acceptance test
2023-02-02 11:38:19 +01:00

1.8 KiB

Step 6: Testing

We should make sure the connector respects the Airbyte specifications before we start using it in production. This can be done by executing the Connector Acceptance Tests.

These tests will assert the most basic functionalities work as expected and are configured in acceptance-test-config.yml.

Before running the tests, we'll create an invalid config to make sure the check operation fails if the credentials are wrong, and an abnormal state to verify the connector's behavior when running with an abnormal state.

Update integration_tests/invalid_config.json with this content

{
  "access_key": "<invalid_key>",
  "start_date": "2022-07-21",
  "base": "USD"
}

and integration_tests/abnormal_state.json with

{
  "rates": {
    "date": "2999-12-31"
  }
}

You can run the acceptance tests with the following commands:

docker build . -t airbyte/source-exchange-rates-tutorial:dev
python -m pytest integration_tests -p integration_tests.acceptance

Next steps:

Next, we'll add the connector to the Airbyte platform.

Read more: