Forum Discussion

JennyH11's avatar
JennyH11
Frequent Contributor
7 years ago

Region checkpoint is changing the selected radio button in tested application during test run

Hi

 

I'm testing a desktop application and am noticing that lots of Region Checkpoints are failing on image comparison. The difference is with the radio button selected at the time the image is captured.

 

After further testing it would seem that the Region Checkpoint operation itself is causing the radio button selection to change. We've narrowed this down through manual testing where the issue does not occur and manually running individual operations leading up to the Checkpoint and then running the Checkpoint itself. It's only when this step is run that the issue occurs.

 

Does anyone have any experience of this happening and can provide advice to combat it or workaround it?

 

Thanks

Jenny

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    All a region checkpoint does is compare an image to another image with a pixel tolerance.  Usually, there is a base image that is stored and then compared to the "live" image in the application.

     

    Is it possible that, when running the automation, that there is a delay in the application that the automation is running too fast for?  For example, say the radio button is unselected.  You run a test step to select the radio button and then do the region comparison.  However, the application hasn't rendered the radio button as selected yet when the region checkpoint kicks in and so the comparison fails.

     

    OR.... it might be one step sooner than that... say, for example, you have some sort of step that needs to execute in order to enable the radio button for selection.  That step executes but there is a short delay in enabling the button.  TestComplete assumes the radio button has been selected but it, in fact, hasn't been.  And then, the region checkpoint fails.

     

    In short... it doesn't sound like a problem with the region checkpoint but in timing in your automation... the fact that you can manually run it at "human speed" up to the check point and then fire the checkpoint seems to point in this direction...  Try "slowing down" the automation run by injecting delays to see if that solves your problem.  If it does, I'd replace the injected delays with smarter code to wait for something to happen before going on to the next step.  WaitAliasChild or WaitChild methods or WaitProperty methods or something like that will allow you to build in these delays to allow the application to catch up before the automation attempts an action.

    • JennyH11's avatar
      JennyH11
      Frequent Contributor

      Hi,

       

      Thanks for your reply Robert.

       

      I have taken on board your advice, however, when I run the operations leading up to the Checkpoint and then run the Checkpoint operation manually, the problem still occurs. To me this is a problem caused by the Checkpoint operation itself as there are no other operations involved.

       

      I'll give a little more thought to the timing idea but it does not seem right to me that a Checkpoint can run in isolation and change anything on the screen in any way...

       

      Thanks

      Jenny

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I have taken on board your advice, however, when I run the operations leading up to the Checkpoint and then run the Checkpoint operation manually, the problem still occurs. To me this is a problem caused by the Checkpoint operation itself as there are no other operations involved.

         

         


         

        That is a curious problem, for sure.  I'll say this... if this was a problem with the tool, others would have reported it... so, while you ARE definitely having a problem, I'm a bit skeptical about it being the checkpoint operation itself.

         

        Can you open the parameters screen of your checkpoint operation and post a screenshot of it here? I just was working with one of my collegues here where they put a "Click" action inside of a "Keys" action... and it worked in that it clicked on the item... but it's an odd situation.  So, I want to make sure that there's nothing strange going on in your implementation of the region checkpoint that might be causing your problem.