|
1 | 1 | # Connector Acceptance Tests
|
2 |
| -This package gathers multiple test suites to assess the sanity of any Airbyte connector. |
| 2 | +This package gathers multiple test suites to assess the sanity of any Airbyte connector. |
3 | 3 | It is shipped as a [pytest](https://docs.pytest.org/en/7.1.x/) plugin and relies on pytest to discover, configure and execute tests.
|
4 | 4 | Test-specific documentation can be found [here](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference/)).
|
5 | 5 |
|
6 | 6 | ## Running the acceptance tests on a source connector:
|
7 |
| -1. `cd` into your connector project (e.g. `airbyte-integrations/connectors/source-pokeapi`) |
| 7 | +1. `cd` into your connector project (e.g. `airbyte-integrations/connectors/source-pokeapi`) |
8 | 8 | 2. Edit `acceptance-test-config.yml` according to your need. Please refer to our [Connector Acceptance Test Reference](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference/) if you need details about the available options.
|
9 | 9 | 3. Build the connector docker image ( e.g.: `docker build . -t airbyte/source-pokeapi:dev`)
|
10 | 10 | 4. Use one of the following ways to run tests (**from your connector project directory**)
|
11 | 11 |
|
12 |
| -**Using python** |
| 12 | +### Using python |
| 13 | +_Note: these will assume that docker image for connector is already built_ |
| 14 | + |
| 15 | +**Running the whole suite** |
13 | 16 | ```bash
|
14 | 17 | python -m pytest integration_tests -p integration_tests.acceptance
|
15 | 18 | ```
|
16 |
| -_Note: this will assume that docker image for connector is already built_ |
17 | 19 |
|
18 |
| -**Using Gradle** |
| 20 | +**Running a specific test** |
| 21 | +```bash |
| 22 | +python -m pytest integration_tests -p integration_tests.acceptance -k "<TEST_NAME>" |
| 23 | +``` |
| 24 | + |
| 25 | + |
| 26 | +### Using Gradle |
19 | 27 | ```bash
|
20 | 28 | ./gradlew :airbyte-integrations:connectors:source-<name>:connectorAcceptanceTest
|
21 | 29 | ```
|
22 | 30 | _Note: this way will also build docker image for the connector_
|
23 | 31 |
|
24 |
| -**Using Bash** |
| 32 | +### Using Bash |
25 | 33 | ```bash
|
26 | 34 | ./acceptance-test-docker.sh
|
27 | 35 | ```
|
@@ -67,4 +75,4 @@ To migrate a legacy configuration to the latest configuration format please run:
|
67 | 75 | python -m venv .venv # If you don't have a virtualenv already
|
68 | 76 | source ./.venv/bin/activate # If you're not in your virtualenv already
|
69 | 77 | python connector_acceptance_test/tools/strictness_level_migration/config_migration.py ../../connectors/source-to-migrate/acceptance-test-config.yml
|
70 |
| -``` |
| 78 | +``` |
0 commit comments