1
0
mirror of synced 2026-01-02 21:02:43 -05:00
Files
airbyte/airbyte-integrations/bases/standard-source-test
Rodi Reich Zilberman 0bab1756b8 Rename airbyte-config module (#24885)
* rename airbyte-config module

* Automated Commit - Formatting Changes

* sanity

* update import

* update import

* update script

* update script

* update script

* update script

* Automated Change

* Automated Change

* Automated Change

* Automated Change

* update awsdatalake icon

* point slash commands to new path

* sanity

* Automated Commit - Formatting Changes

* sanity

* Automated Change

* Automated Change

* sanity

---------

Co-authored-by: rodireich <rodireich@users.noreply.github.com>
2023-04-06 10:47:30 -07:00
..
2020-10-22 20:06:33 -07:00
2020-10-22 20:06:33 -07:00
2023-03-16 22:42:30 +01:00

Standard Source Test

Overview

These tests are designed to do the following:

  1. Test basic functionality for any Airbyte source. Think of it as an "It works!" test.
    1. Each test should test functionality that is expected of all Airbyte sources.
  2. Require minimum effort from the author of the integration.
    1. Think of these are "free" tests that Airbyte provides to make sure the integration works.
  3. To be run for ALL Airbyte sources.

These tests are not designed to do the following:

  1. Test any integration-specific cases.
  2. Test corner cases for specific integrations.
  3. Replace good unit testing and integration testing for the integration.

We will not merge sources that cannot pass these tests unless the author can provide a very good reason™.

What tests do the standard tests include?

Check out each function in SourceAcceptanceTest. Each function annotated with @Test is a single test. Each of these functions is proceeded by comments that document what they are testing.

How to run them from your integration?

  • If writing a source in Python, don't use this.

What do I need to provide as input to these tests?

  • The name of the image of your integration (with the :dev tag at the end).
  • A handful of json inputs, e.g. a valid configuration file and a catalog that will be used to try to run the read operation on your integration. These are fully documented in SourceAcceptanceTest. Each method that is marked as abstract are methods that the user needs to implement to provide the necessary information. Each of these methods are preceded by comments explaining what they need to return.
  • Optionally you can run before and after methods before each test.

Do I have to write java to use these tests?

No! Our goal is to allow you to write your integration entirely in your language of choice. If you are writing an integration in Python, for instance, you should be able to interact with this test suite in python and not need to write java. Right now, we only have a Python interface to reduce friction for interacting with these tests, and with time, we intend to make more language-specific helpers available. In the meantime, however, you can still use your language of choice and leverage this standard test suite.