Skip to content

Commit

Permalink
📖 Add run one test example to SAT readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bnchrch committed Feb 2, 2023
1 parent 2f6103e commit a0b2998
Showing 1 changed file with 15 additions and 7 deletions.
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
```
```

0 comments on commit a0b2998

Please sign in to comment.