06-27-2008, 05:02 PM
hello all,
I am facing the following problem in QTP 9.5. I am using the web services add-in to test..well..web services
anyways, the following is the code;
When the arguments are all valid, the web service returns an XML output which is verified via an xml checkpoint above, however, when an invalid argument is passed or an argument which does not generate any data, the web service is supposed to generate an exception, which it does, but that exception basically stops QTP's test run.
Now i need to capture that exception and add a checkpoint to verify whether its the intended exception thrown by the web service e.g. an exception is supposed to be thrown when an invalid login is sent...my checkpoint will verify actual and expected exception but it cannot as the exception is generated and shown by QTP in an error message and it stops execution.
Need help.
I am facing the following problem in QTP 9.5. I am using the web services add-in to test..well..web services
anyways, the following is the code;
Code:
WSOrdReq = WebService("WSWebSer").WSOrdReq(DataTable("Branch", dtGlobalSheet), DataTable("Company", dtGlobalSheet), DataTable("Login", dtGlobalSheet), DataTable("Password", dtGlobalSheet), DataTable("MISMO_Ver", dtGlobalSheet), DataTable("DataStream", dtGlobalSheet))
XMLFile("WS.xml").Check CheckPoint("WS.xml")
When the arguments are all valid, the web service returns an XML output which is verified via an xml checkpoint above, however, when an invalid argument is passed or an argument which does not generate any data, the web service is supposed to generate an exception, which it does, but that exception basically stops QTP's test run.
Now i need to capture that exception and add a checkpoint to verify whether its the intended exception thrown by the web service e.g. an exception is supposed to be thrown when an invalid login is sent...my checkpoint will verify actual and expected exception but it cannot as the exception is generated and shown by QTP in an error message and it stops execution.
Need help.