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

Source Bing Ads: add integration tests #35961

Merged
merged 9 commits into from
Apr 8, 2024

Conversation

darynaishchenko
Copy link
Collaborator

resolved: https://github.com/airbytehq/airbyte-internal-issues/issues/6654

Added integration tests for streams:
1. app_install_ads
2. app_install_ad_labels
3. age_gender_audience_report_hourly
4. account_impression_performance_report_hourly
5. keyword_performance_report_hourly
6. ad_performance_report_hourly
7. ad_group_impression_performance_report_hourly
8. campaign_performance_report_hourly
9. campaign_impression_performance_report_hourly
10. geographic_performance_report_hourly
11. search_query_performance_report_hourly
12. user_location_performance_report_hourly
13. ad_group_performance_report_hourly
14. account_performance_report_hourly

*_hourly_reports cannot be tested with cat as sync is too long. app_install_ads and app_install_ad_labels streams are empty.
Also updated expected records with *monthly reports and removed them from cat cinfig.

@darynaishchenko darynaishchenko self-assigned this Mar 11, 2024
Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Apr 8, 2024 11:02am

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional approval on improving the maintainability of

  • airbyte-integrations/connectors/source-bing-ads/unit_tests/integrations/test_app_install_ad_labels_stream.py
  • airbyte-integrations/connectors/source-bing-ads/unit_tests/integrations/test_budget_stream.py

self.auth_client(http_mocker)
output, _ = self.read_stream(self.stream_name, SyncMode.full_refresh, self._config, "app_install_ad_labels_empty")
assert len(output.records) == 0
assert len(output.logs) == 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems rather flaky i.e. if someone add a log, this will fail. Why are logs important here in terms of behavior? Can we scope the test to that behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we discussed this in previous pr #35201 (comment)

"app_install_ad_labels_with_state",
state
)
assert len(output.records) == 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have less records in this test than in test_incremental_read_cursor_value_matches_value_from_most_recent_record since we start from a state? It seems like in integration test, the outcome is just that gets DownloadParams object part so I think I would remove this assertion

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't filter records in this streams, so number of records depends of response, I will remove this assert

@@ -0,0 +1,54 @@
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comments in airbyte-integrations/connectors/source-bing-ads/unit_tests/integrations/test_app_install_ad_labels_stream.py apply here

@darynaishchenko darynaishchenko merged commit 3788441 into master Apr 8, 2024
29 checks passed
@darynaishchenko darynaishchenko deleted the daryna/source-bing-ads/integration-tests branch April 8, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants