MatthiasBuck
14 years agoOccasional Contributor
Unit Testing One Way Web Services?
I'm trying to create repeatable unit tests for web service applications with one-way web services that don't have a response.
I figured out how to create repeatable unit tests for two-way web services. This can be done by using mock services and assertions on the response but this obviously doesn't work for the one-way calls since there is no response.
I tried to see if the tested application could (one-way) invoke a mock service in soapUi but from what I can see, it's not possible to have assertions on the mock service itself to assert the request message. Furthermore, I believe that assertions are the only way of having a test case fail. This is important when you want to have test cases executed in an automated fashion e.g. by a script on a continuous integration server.
Does anybody have an idea how this could be done?
I figured out how to create repeatable unit tests for two-way web services. This can be done by using mock services and assertions on the response but this obviously doesn't work for the one-way calls since there is no response.
I tried to see if the tested application could (one-way) invoke a mock service in soapUi but from what I can see, it's not possible to have assertions on the mock service itself to assert the request message. Furthermore, I believe that assertions are the only way of having a test case fail. This is important when you want to have test cases executed in an automated fashion e.g. by a script on a continuous integration server.
Does anybody have an idea how this could be done?