- it takes a long time (about 3 hours) for the tests to complete
- it's impossible to do concurrent tests because they'll interfere with each other
I want to stop making live API calls.
I have an idea:
- short circuit the request before it's fired
- assert that the request URL is correct, in a way that, for example, if I pass a value
first_nameparam, I'd expect the request URI to contain
first_name=John. Also, I have to be wary about optional params.
However, I don't think this is a full replacement because I lose the robustness of the response.
How do I know that the request is, in fact, valid without making a live call and checking the response code or JSON response?
Right now the library is using a random HTTP lib, but in the next major release which I'm working on right now, I will switch to Guzzle, which does support testing and short circuiting the request.
Finally, you can see an example of the API response here: https://reference.assemblypayments.com/#create-item