Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want to not fail on handeled run error in web service test
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi All,
I am beginner in QTP and using version 10 of QTP for functional testing of webservices. but a problem. i could test a correct state of my webservice successfully but for state that my webservice have to return a error that i expected, it fail when i test it. i said to it :
if ( isExpectedErrorOccure ) Reporter.ReportEvent micPass, "Login Test", "test reason: passed."
But when the webservice return a correct handled error it set the test result to failed, but for me it is passed. Sad
What should i do for this problem?
Thanks a lot.
My test script is such below:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Code:
WebService("ServicesService_2").login XMLWarehouse("userBean")
testError = WebService("ServicesService_2").GetLastError
if  ( reason = "Incorrect password" )  then
expectedError = "User name or password is incorrect!"
isExpectedErrorOccure = InStr(testError, expectedError)
if(isExpectedErrorOccure >0) then
Reporter.ReportEvent micPass, "Login Test",  "test reason: " & reason & " passed."
else
Reporter.ReportEvent micFail, "Login Test",  "test reason: " & reason & "  failed."
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Reply


Messages In This Thread
I want to not fail on handeled run error in web service test - by sanavab - 03-06-2011, 08:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 339 11-05-2023, 03:55 PM
Last Post: lravi4u
  Send automatic email notification when test run started helmzshelmz 0 931 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  How to identify an error page occurring in server in between the qtp run. aswini 1 1,644 05-04-2017, 03:52 PM
Last Post: Ankur
  Test runned from QualityCenter generated an error "Attempted to divide by zero." robertosalemi 1 2,367 10-14-2016, 08:38 PM
Last Post: robertosalemi
  Exe invoked through UFT is unable to access IIS and SQL Server service bkdevise 0 1,977 08-25-2015, 05:49 PM
Last Post: bkdevise

Forum Jump:


Users browsing this thread: 1 Guest(s)