Skip to content

Handling Webhooks #934

Answered by nicolasiensen
fmaclen asked this question in Q&A
Apr 22, 2022 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

My app has an endpoint POST /webhooks and during my tests I'm able to trigger the expected webhooks from an external API

This seems odd. If you have to rely on an external service to call the system under test, you risk the determinism of your test suite.

Can't you make the request to POST /webhooks from the test itself?

the issue is that those incoming requests aren't recorded by VCR

It seems that you misunderstood the purpose of VCR. It doesn't record incoming requests to the system under test, but outgoing requests and their responses.

VCR was designed to improve the reliability of the test suite of systems that depend on third-party APIs. For example, suppose your system integrate…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by fmaclen
Comment options

You must be logged in to vote
2 replies
@nicolasiensen
Comment options

@fmaclen
Comment options

Comment options

You must be logged in to vote
1 reply
@shunichi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants