Forum Discussion
deepesh_jain
14 years agoFrequent Contributor
Well, in your original post you didn't talk anything about assertions. These assertions do validate only the responses not the requests. If you are looking to what these different assertions do, here is the updated response:
1. SOAP RESPONSE : This assertion validates that the response received is actually a SOAP RESPONSE. Unless your webservice is down or something, you should always get this passed. If not, that means the response timed out and you didnt get a soap response. For example, how you sometimes get "Page cannot be displayed" when the web page is not available. Same concept
2. SOAP FAULT : This assertion will validate that the SOAP Response that you got is actually a SOAP FAULT. For example, you might have sent an incorrect xml as a part of your test case and you are expecting that you would get a SOAP FAULT. In this case, you would have SOAP FAULT as your assertion. SOAP FAULT assertion will PASS your test case if you get SOAP FAULT in response.
3. NOT SOAP FAULT : This is exactly opposite to the one above. If you do expect a valid SOAP RESPONSE, you would place this assertion, and this assertion will PASS your test case in case it gets a valid SOAP RESPONSE. If you placed this assertion, but in case you get a SOAP FAULT in your response, this assertion will fail the test case.
With the example request and response you sent, the response if you notice is a good SOAP response and is not a SOAP FAULT. So for that particular response if you include both SOAP FAULT and NOT SOAP FAULT assertion, the former would FAIL while the latter will PASS.
Hope this helps.
Regards,
Deepesh Jain
1. SOAP RESPONSE : This assertion validates that the response received is actually a SOAP RESPONSE. Unless your webservice is down or something, you should always get this passed. If not, that means the response timed out and you didnt get a soap response. For example, how you sometimes get "Page cannot be displayed" when the web page is not available. Same concept
2. SOAP FAULT : This assertion will validate that the SOAP Response that you got is actually a SOAP FAULT. For example, you might have sent an incorrect xml as a part of your test case and you are expecting that you would get a SOAP FAULT. In this case, you would have SOAP FAULT as your assertion. SOAP FAULT assertion will PASS your test case if you get SOAP FAULT in response.
3. NOT SOAP FAULT : This is exactly opposite to the one above. If you do expect a valid SOAP RESPONSE, you would place this assertion, and this assertion will PASS your test case in case it gets a valid SOAP RESPONSE. If you placed this assertion, but in case you get a SOAP FAULT in your response, this assertion will fail the test case.
With the example request and response you sent, the response if you notice is a good SOAP response and is not a SOAP FAULT. So for that particular response if you include both SOAP FAULT and NOT SOAP FAULT assertion, the former would FAIL while the latter will PASS.
Hope this helps.
Regards,
Deepesh Jain
Related Content
- 3 days ago
- 12 years ago
- 4 months ago
Recent Discussions
- 15 years ago