Forum Discussion

praveensqa's avatar
praveensqa
Contributor
14 years ago

How to pass the PASS, FAIL Status to the Log.

Hi All,

How to pass the PASS, FAIL Status to the Log.



Suppose if  (Condition) Then

                  log.event (Pass)

             else

                 log. (Here Fail 

End if

As of now i am using Log.event, Log.Error

                              Pass for Event.

Fail- Error.

But After  log.Error the script is going to stop. But i need to continue. So, is there any way to send Fail status to the Log.



Regards,

Praveen




1 Reply

  • Hi Praveen,


    You can use the Log.Error method to post error messages to the test log. To post informative messages, use the Log.Message method. For example, you can use the following code:




     If (condition) Then

       Call Log.Message("Success.")

     Else

      Call Log.Error("Failure.")

     End If


    In order for TestComplete not to stop the test execution when an error is posted to the log, disable the Stop on error option.