-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Standard tests: update template #2937
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`we`` should also change the README to show how to run tests, and do the same thing for the singer template
2243c25
to
eae41d8
Compare
d5c6249
to
8a534bc
Compare
airbyte-integrations/connector-templates/source-python/sample_files/invalid_config.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with some small comments! We should merge this with the docs changes so they are done atomically probably.
@@ -86,6 +86,10 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/sample_files:/sample_files | |||
1. To run additional integration tests, place your integration tests in a new directory `integration_tests` and run them with `python -m pytest -s integration_tests`. | |||
Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named. | |||
|
|||
### Standard Tests | |||
1. Update standard_test_config.yml file to disable/repeat or customize behaviour/inputs of specific tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Update standard_test_config.yml file to disable/repeat or customize behaviour/inputs of specific tests. | |
1. Update standard_test_config.yml file to configure tests. See (standard testing)[some-link] for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this link should point to the actual docs once we have them.
@@ -0,0 +1,5 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should get rid of the sample_files
directory and just integration_tests
or something. I think less people will be confused by this. I am in favor of doing the latter name. We can do it now or in another PR. up to you.
package_data={"": ["*.json"]} | ||
install_requires=MAIN_REQUIREMENTS, | ||
package_data={"": ["*.json"]}, | ||
extras_require={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it idiomatic to require installing an extra to run tests? I wasn't sure if this was the right solution earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are many envs, testing env might require quite heavy dependencies, and absolutely not needed for a connector to work. usually, it is a good thing to separate such dependencies, as well as sometimes separate dev dependencies (like tools to debug, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok in this case we should also update the README.md
testing section to say that the user should install pip install ".[tests]"
before running tests
@@ -99,6 +99,10 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/sample_files:/sample_files | |||
1. To run additional integration tests, create a directory `integration_tests` which contain your tests and run them with `pytest integration_tests`. | |||
Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named. | |||
|
|||
### Standard Tests | |||
1. Update standard_test_config.yml file to disable/repeat or customize behaviour/inputs of specific tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
…nnectors.md Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
b8fb533
to
786f883
Compare
airbyte-integrations/connector-templates/source-python/acceptance-test-config.yml.hbs
Show resolved
Hide resolved
airbyte-integrations/connector-templates/source-python/acceptance-test-config.yml.hbs
Outdated
Show resolved
Hide resolved
airbyte-integrations/connector-templates/source-python/acceptance-test.sh
Outdated
Show resolved
Hide resolved
airbyte-integrations/connector-templates/source-python/README.md.hbs
Outdated
Show resolved
Hide resolved
docs/contributing-to-airbyte/building-new-connector/testing-connectors.md
Outdated
Show resolved
Hide resolved
docs/contributing-to-airbyte/building-new-connector/testing-connectors.md
Outdated
Show resolved
Hide resolved
* individual tests can be disabled in the config file | ||
* individual tests can have different inputs and run multiple time with different sets of inputs | ||
* each test has a timeout | ||
* each test has stores all inputs and outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* each test has stores all inputs and outputs | |
* each test stores all inputs and outputs, which can be used for debugging failures |
docs/contributing-to-airbyte/building-new-connector/testing-connectors.md
Outdated
Show resolved
Hide resolved
docs/contributing-to-airbyte/building-new-connector/testing-connectors.md
Outdated
Show resolved
Hide resolved
airbyte-integrations/connector-templates/source-python/README.md.hbs
Outdated
Show resolved
Hide resolved
+ improve plugin behaviour, enable it explicitly + add acceptance.py to run acceptance tests together with integration tests + remove helper acceptance-test-python.sh + fix gradle command for acceptance tests + update docs
b3fa792
to
dc689ab
Compare
closes #2185
What
Describe what the change is solving
It helps to add screenshots if it affects the frontend.
How
Describe the solution
Pre-merge Checklist
Recommended reading order
test.java
component.ts