If I have some strings that represent JSON respons...
# singer-tap-development
a
If I have some strings that represent JSON response bodies I want to use to test a RESTStream, do you have a suggestion on how to use an instance of the tap in my test to parse the response body to inspect the resulting record messages?
v
it depends on what you're after. If it's to test live data, I'd go with
dbt tests
, another approach is https://gitlab.com/meltano/sdk/-/merge_requests/197 There's approaches in the SDK for loading static data if that's what you're after https://gitlab.com/meltano/sdk/-/blob/main/tests/core/test_streams.py#L199 Luckily when I need to do this I can normally just test the individual function I"m using https://github.com/AutoIDM/tap-zohosprints/blob/main/tap_zohosprints/tests/test_core.py#L42 and feel good about it
a
Thanks. I have a fixture very much like the static data loading approach you point out. Unfortunately it does not include the parent context identifiers
v
https://github.com/AutoIDM/tap-googleads/pull/19 , gets a bit closer to what you're after I think @adam_roderick 😄
a
@visch thanks, that helps me understand better the hooks available to process records