Forum Discussion

ringraham's avatar
ringraham
Contributor
9 years ago
Solved

How to compare two numbers, log error if fail to be equal, and stop test

Hi All. I realize this should be really simple, but I'm just not seeing how to do this with TestComplete. Instead of doing an aqObject.CheckProperty(...) I want to do something like a aqNumber.CheckValues(valueA, cmpEqual, valueB) and have it log the error and stop execution if they are not equal.

 

What in the world am I missing!? Does something like this exist and I'm just missing it??

 

Thanks.

 

-Ron

  • I didn't find anything built in to do what you described.  I would use something like this:

     

    If (valueA <> valueB) then

      Call Log.Error("They don't match.", "")

      Call Runner.Stop

    Endif

     

      

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I didn't find anything built in to do what you described.  I would use something like this:

     

    If (valueA <> valueB) then

      Call Log.Error("They don't match.", "")

      Call Runner.Stop

    Endif

     

      

    • ringraham's avatar
      ringraham
      Contributor

      Too Easy. Thanks very much and sorry if that wasted anyone's time!