What’s the best way to automate integration testing when they’re are asynchronous callbacks involved?
Say for instance I have module A, and when I call something on that module it immediately returns a response which I can validate as part of my tests. But in addition to that immediate response, a callback should occur within a certain amount of time (say 5 minutes) that provides additional information that needs to be evaluated for the test.
Essentially, I’d like to perform an test immediately on the response, and then tell some testing to expect a callback within a certain amount of time and validate that as well. If no callback occurs in the timeframe, or if the callback has an unexpected response, the test will fail.
Is there a continuous integration tool or some other tool that I can use to perform tests like this?
I think I have a solution using jenkins:
This will most likely involve creating a parameterized job for the callbacks, as it needs to know what callback log to check when it runs (i.e. check the callback log for normal build 90)
Kind of tired at the moment, so that might not make sense – but I’d be glad to clarify if need be.