Forum Discussion

ct_biji's avatar
ct_biji
Occasional Contributor
13 years ago

To display error message in the logs.

Hi,

I wanted to log the errors to the log so i used Log.error("Message")

But on doing so if the program control goes to the line the execution enda without the checking the other cases.

Is there any way i can log the errors and get a complete test report after that.


If(aqString.Compare(phNo,exPh,True)) Then


(.Compare(phNo,exPh,))

Log.Error("Phone Number is not as Expected "&phNo)


Else


Log.Message("Phone Number is as Expected "&phNo)


End If



If(eId=exEmail) then

Log.Message("....")

else

Log.Error("...")

end if

as u can c here if the comparison returns -1 or 1 it goes toLog.error and any scenerios below it is over seen and test complet ends the test .

is there any way that i can see the results after the whole scenerio is done



thanks,

Doyel



2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Most likely you have the option "Stop On Error" turned on.  So, anytime an error is reported (even a Log.Error) your automation will stop.



    Couple of places where this is set.  First, there's in your Project Properties (Tools | Current Project Properties | Project | Playback.  If "Stop on error" is checked there, as soon as an error is logged to your test log, the project stops and does not go on to your next step.



    Secondly, in your Test Items panel (http://smartbear.com/support/viewarticle/11001/), if your test item has the Stop on error set to either Test Item or Project, when an error is logged, that item may stop the testing.



    Turn these options off and TestComplete will no longer stop upon logging an error.
  • ct_biji's avatar
    ct_biji
    Occasional Contributor
    The option was checked.Now its displaying the messages after the complete execution.

    Thanks

    Doyel