stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.59k stars 374 forks source link

Integration tests #1057

Open maxime1992 opened 1 year ago

maxime1992 commented 1 year ago

Problem

I've got a Kotlin project that will be dealing with the webhooks calls made by Stripe.

I'd like to have some integration tests. While it's easy to do that manually by launching Stripe CLI and listen for events + mock some events, I'd like to have that automated.

Feature

I don't believe such thing is possible from the Java SDK and all the fixtures seems to be in stripe-cli project (which is legit ofc).

But I wonder what's my best option to achieve this:

Maybe there's already a proper way of doing that and I missed it? But I think this CLI is really handy and the logic behind it could be used for more things than using it manually eventually? (as a testing sdk for example)