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

Tdl 14962 implement tap tester tests #53

Closed
wants to merge 25 commits into from

Conversation

prijendev
Copy link
Contributor

@prijendev prijendev commented Sep 24, 2021

Description of change

TDL-14962 Implement QA tests

  • Added below test cases
    • Test Discovery mode
    • Test Bookmark
    • Test Start Date
    • Test All Fields
    • Test Automatic Fields
    • Test Sync canary

Note :

  • Test pagination has been skipped as there is no concept of pagination in API call.
  • Code coverage report not added for this PR as there is no unittest case.

Currently some line of code has been commented to pass the circelci build. Once PR 45 merge, I will uncomment the code and pass the circleci build.

Manual QA steps

Risks

Rollback steps

  • revert this branch


def test_run(self):
"""
Verify that for each stream you can get enough data

Choose a reason for hiding this comment

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

It should be:

Verify we can deselect all fields except when inclusion=automatic, which is handled by base.py methods
Verify that only the automatic fields are sent to the target.
Verify that all replicated records have unique primary key values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

• Verify no unexpected streams were replicated
• Verify that more than just the automatic fields are replicated for each stream.
• verify all fields for each stream are replicated
• verify that the automatic fields are sent to the target

Choose a reason for hiding this comment

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

This one we are testing as part of aumatic_field so not required here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, removed it.

# collect information specific to incremental streams from syncs 1 & 2
expected_replication_key = next(
iter(self.expected_replication_keys().get(stream, [])))
replication_dates_1 = [row.get('data').get(expected_replication_key) for row in

Choose a reason for hiding this comment

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

Can we change formating to make it more readable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, changes the formatting.

@@ -1,4 +0,0 @@
{

Choose a reason for hiding this comment

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

Why we removed this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added back.

@@ -11,7 +11,7 @@ jobs:
python3 -mvenv /usr/local/share/virtualenvs/tap-pendo
source /usr/local/share/virtualenvs/tap-pendo/bin/activate
pip install -U pip setuptools
pip install .[dev]
pip install .[test]
Copy link
Contributor

Choose a reason for hiding this comment

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

@prijendev Does this indicate that we no more consider the modules added as part of the 'dev' list?

Copy link
Contributor Author

@prijendev prijendev Oct 11, 2021

Choose a reason for hiding this comment

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

Yes, because earlier circleci was failing due to ipdb dependency listed under 'dev' list. So, as per suggestion given in link split down 'dev' list dependency into 'test' and 'dev' list.

@@ -1,150 +1,34 @@
import unittest
Copy link
Contributor

Choose a reason for hiding this comment

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

@prijendev Can you please explain the reason behind removing this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have followed standard tap-tester suit. So, all expected metadata and helper methods available in base.py file. Then we are using that methods in all test cases. That's why we removed redundant code from test_sync file.

prijendev and others added 4 commits October 27, 2021 12:11
* bug fix for full table stream record count

* updated config.yml file

* added comment

Co-authored-by: harshpatel4_crest <[email protected]>
* big fix for start date of child streams

* updated test name

* updated the code to fix bug in visitor history

* added dev and test env

* updated config.yml file, resolved review comments

Co-authored-by: harshpatel4_crest <[email protected]>
* added best practices

* bug fix

* added test and dev groups

* undo unittest code added to run in cci

* undo the bug changes in this PR

Co-authored-by: harshpatel4_crest <[email protected]>
* added backoff for error and timout for requests

* added dev and test env

* run unittests in CCi

* created a variable for timeout seconds

* added comments and updated the code to use param from config for timeout

* updated the code and added test cases

* added comment, updated readme file

* typecasted request timeout, updated unittest name

* added code change for empty string timeout value from config

* updated timeout code and added unittests

* resolved pylint error

* resolve unittest failure

Co-authored-by: harshpatel4_crest <[email protected]>
prijendev and others added 10 commits October 27, 2021 13:46
* removed the endpoints dictionary

* Removed an unwanted comment

* added best practices

* bug fix

* TDL-14795: Removed unused imports

* TDL-14795: Undo extra line changes

* added test and dev groups

* undo unittest code added to run in cci

* undo the bug changes in this PR

* removed unused variable method

* added unittest case for the updated code

* resolved pylint errors

* resolved pylint errors

* resolved pylint errors

* Removed f-string

* resolved comments

* added code coverage

* fixec cirlceci error

* resolved merge conflict

* resolved removed conflict

Co-authored-by: namrata270998 <[email protected]>
Co-authored-by: harshpatel4_crest <[email protected]>
Co-authored-by: dbshah1212 <[email protected]>
Co-authored-by: savan-chovatiya <[email protected]>
* removed the endpoints dictionary

* Removed an unwanted comment

* added best practices

* bug fix

* TDL-14795: Removed unused imports

* TDL-14795: Undo extra line changes

* TDL-6877 added backogg for conn reset error

* added test and dev groups

* undo unittest code added to run in cci

* undo the bug changes in this PR

* TDL-6877 resolved the comments

* resolved pylint errors

* resolved pylint errors

* Removed f-string

* added code coverage in circleci

* removed unwanted imports

* fixed unittest error

Co-authored-by: namrata270998 <[email protected]>
Co-authored-by: harshpatel4_crest <[email protected]>
Co-authored-by: dbshah1212 <[email protected]>
Co-authored-by: savan-chovatiya <[email protected]>
* updated incremental streams as full table

* added a comment for code change

* added dev and test env

* run unittests in CCi

* resolve test case failure

* updated start date in test_sync

* updated comment

* added comment

Co-authored-by: harshpatel4_crest <[email protected]>
* TDL-14950 removed the line that caused the bug and addd a unittest

* added best practices

* bug fix

* added test and dev groups

* undo unittest code added to run in cci

* undo the bug changes in this PR

* resolved the comment and updated the testcase

* removed commented code

* Removed f-string from added code

* added code coverage in circleci

* added code comments

Co-authored-by: namrata270998 <[email protected]>
Co-authored-by: harshpatel4_crest <[email protected]>
Co-authored-by: savan-chovatiya <[email protected]>
* TDL-14964: Fixed noneType date parsing

* Resolve pylint failure

* Added nose in setup

* Added code comments

* Added code comments

* Resolve pylint error

* Resolved review comment and add coverage report in CircleCI

* Added bookmark check in all unit tests

* Revert some code as it is as covered in other PR

Co-authored-by: savan-chovatiya <[email protected]>
* TDL-14945: Fixed iterator by making list

* Updated comment message

* TDL-14945: Updated setup file for resolve CircleCI build

* Added code comments

* Reolved review comment and add code coverage report in CircleCI

Co-authored-by: savan-chovatiya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants