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

[CT-3400] Document testing best practices in CONTRIBUTING.md #9111

Open
Tracked by #9110
MichelleArk opened this issue Nov 16, 2023 · 1 comment
Open
Tracked by #9110

[CT-3400] Document testing best practices in CONTRIBUTING.md #9111

MichelleArk opened this issue Nov 16, 2023 · 1 comment
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Nov 16, 2023

Examples:

  • one test method per class
  • additional, more precise assertion after using expect_pass=False with run_dbt
  • avoid asserting on specific things, not like '1.0' in message
@github-actions github-actions bot changed the title Document testing best practices in CONTRIBUTING.md [CT-3400] Document testing best practices in CONTRIBUTING.md Nov 16, 2023
@MichelleArk MichelleArk added the tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality label Nov 16, 2023
@McKnight-42
Copy link
Contributor

some notes from things we've seen in adapter land pulling in tests.

our general teardown method defined for testing doesn't catch any default value schemas so any changes currently to schema, database, or the identifier from initial test initialization are not caught and require clean_up methods added to the test see prs like #9195 for example where we have some changes to alt databases or modify the test_schema name.

not doing this leads to hanging artifacts that slowly build up and and causes the test databases to reach limits (typically around 10K for us) and cause all tests to fail. till items are dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

No branches or pull requests

2 participants