Add standardized test approach to evaluate stream output against expectations #257
Labels
Accepting Pull Requests
Community-Contributed PR
flow::review
kind/Feature
New feature or request
migrated from gitlab
valuestream/SDK
Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/259
Originally created by @stkbailey on 2021-10-26 10:45:25
Summary
This request covers the ability to write integration tests at the stream level for taps. Example tests a developer may want to create are:
Proposed benefits
An endorsed approach to testing streams will allow developers to easily implement test-driven development practices as well as increase the quality of taps overall.
Proposal details
I recently added some testing to
tap-slack
that might be worth refining/abstracting for the SDK. The approach was this:This approach allowed me to catch several schema mismatches and a few critical issues related to the state partitioning keys mentioned above.
https://github.com/MeltanoLabs/tap-slack/blob/7892c39667f7817e426ee025d2c52622568c38d6/tests/test_streams.py#L27
Best reasons not to build
I don't think adding a feature like this would negatively affect existing taps, as the tests could be added "a la carte" by developers. However, I do think there is a risk in adding a test suite that is prone to taking up a long time or prone to error. For example, the approach outlined above works when there is a very small data volume but would not work on large taps. So finding ways to control execution time in particular is very important.
The text was updated successfully, but these errors were encountered: