I am testing a web service (SOAP) using application test . I have a set of input xml that i need to test against a web service endpoint . I use a File counter ( Numeric counting data set) , Read a file and hit the web service. based on the web service response , I need to mark the test step/case as pass/fail .
I tired using a XML Xpath Assertion to capture the web service result , and then mark the test case as FAIL and then proceed to Next test case in the Counter. However, I am not able to achieve this . Either it marks all of them as PASS (even though the webservice returns false ), or it ends the test and does not go to next input. Please advise. Thanks
if you are just looking to see failed iteration in ITR, use generate error in assertion options and next step would be continue with the loop.
Other option is branch out at assertion, one writes good r esponse , other branch generates error and failed response output, and both continue with the loop.
Hi AbhinavGMF, thanks for your response . Yes< I need the second option where I need the test to continue if each test case FAILS or PASSES and capture the status in the Test Report. Currently , I am either getting all the test cases marked as PASS (even some of the test cases fail ) or If I add Fail the Test , it does not go to the loop and it end the test at that point. How do I branch out the assertion ? Can you please explain or provide more details on the steps ? Thanks
1. add a companion. Fail Test Companion
2. Instead of fail the test in assertion, change it to generate error.
Once done, check if it matches your expectations
Capturing test results in a detailed report requires adding couple of more test steps.
You can follow below as your DevTest Framework for Test Case Design and automation.
Thanks again. I added the Fail Test Companion and have assert to error condition . But , it did not make a difference. Is there any thing else to be added , when we add this companion ?
You should see test case fail if any iteration fails and loop to continue on error provided there is loop.
Are you not seeing it?
Sent with Good (www.good.com)