Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Add run one test example to SAT readme #22292

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Changes from all commits
Commits
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
22 changes: 15 additions & 7 deletions airbyte-integrations/bases/connector-acceptance-test/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
# Connector Acceptance Tests
This package gathers multiple test suites to assess the sanity of any Airbyte connector.
This package gathers multiple test suites to assess the sanity of any Airbyte connector.
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.
Test-specific documentation can be found [here](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference/)).

## Running the acceptance tests on a source connector:
1. `cd` into your connector project (e.g. `airbyte-integrations/connectors/source-pokeapi`)
1. `cd` into your connector project (e.g. `airbyte-integrations/connectors/source-pokeapi`)
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.
3. Build the connector docker image ( e.g.: `docker build . -t airbyte/source-pokeapi:dev`)
4. Use one of the following ways to run tests (**from your connector project directory**)

**Using python**
### Using python
_Note: these will assume that docker image for connector is already built_

**Running the whole suite**
```bash
python -m pytest integration_tests -p integration_tests.acceptance
```
_Note: this will assume that docker image for connector is already built_

**Using Gradle**
**Running a specific test**
```bash
python -m pytest integration_tests -p integration_tests.acceptance -k "<TEST_NAME>"
```


### Using Gradle
```bash
./gradlew :airbyte-integrations:connectors:source-<name>:connectorAcceptanceTest
```
_Note: this way will also build docker image for the connector_

**Using Bash**
### Using Bash
```bash
./acceptance-test-docker.sh
```
Expand Down Expand Up @@ -67,4 +75,4 @@ To migrate a legacy configuration to the latest configuration format please run:
python -m venv .venv # If you don't have a virtualenv already
source ./.venv/bin/activate # If you're not in your virtualenv already
python connector_acceptance_test/tools/strictness_level_migration/config_migration.py ../../connectors/source-to-migrate/acceptance-test-config.yml
```
```