I want to build some integration test for our backend webservice. This webservice accepts a request, does some validation, responds to the caller and puts a message into a queue (JBoss EAP 7, active-mq). After that, some other webservices are called to collect some information and finally an email is sent to the caller.
What I want to do now is, to write integration tests, that verify, that:
- The queuing message is correctly created and scheduled.
- All external webservices are called correctly in the right order.
- The email is sent correctly.
I tried to use arquillian for this use case but I met following problems:
- Because of the asynchronous processing, I need something like a callback that informs me when the job is done. If I test the results instantly in a @Test annotated method, the tested code is likely not done.
- I don't know, how to test http calls (for the external webservices), correct queuing (active mq) and smtp server calls for the email. Is there a solution for that?
Aucun commentaire:
Enregistrer un commentaire