Forum Discussion

ThomasK's avatar
ThomasK
New Contributor
4 years ago
Solved

Self-healing on item or version number

Hi,

 

I am using TestComplete to automate tests in a home-made desktop application. But I have a problem that occurs in every Keywordtest I run.

 

Some objects on my application seems to change on every run: version number or iteration number. That's something that can't be improved by myself. This causes a lot of self-healing during the execution and takes a lot of time. Here is an example:

 

Property Mapping ValueFoundAction
JavaFullClassNameorg.eclipse.swt.widgets.Shellorg.eclipse.swt.widgets.Shell 
WndCaptionClient [QA] (5.9.0.20200707-1112-b697) - CAT (5.9.0.6cbbca7) QAC-200707-0053 - Inspection* - Chief F. (CAE1)Client [QA] (5.9.0.20200707-1112-b697) - CAT (5.9.0.6cbbca7) QAC-200707-0066 - Inspection - Chief F. (CAE2)Update

The client number, the catalog number, the CAE number or the inspection number can all change on each execution.

 

How can I fix that? Is it possible to ignore some part or to validate with a regex? With a regex, how can I achieve that in Keywordtest?

 

Thanks! Have a nice day!

  • 1) Use the wildcards in your name mapping.  That will let all the similar objects be found in one place in the mapping.

    2) If the app changes, the test has to change.  In this case we can probably help you fix it easily.  In other cases it might not be so easy.  You might want to look over your tests and see if you can parameterize them or break them into smaller modules to keep those large numbers of tests and steps from biting you in the future.

3 Replies

    • ThomasK's avatar
      ThomasK
      New Contributor

      Hello,

       

      Thank you for your kind response.

       

      I can't see how to implement your solution:

      1. With keywordtests, I can't find something like this Client [QA] (5.9.0.20200707-1112-b697) - CAT (5.9.0.6cbbca7) QAC-200707-0053 - Inspection* - Chief F. (CAE1). My view is this one and I don't see where wildcards can be used without converting to Script.

      2. I have about 100 to 200 steps for one test, and I expect 500 testcases in the future. Assuming that I have the warning one step out of 5 on average, added to the maintenance work, it's a huge labor to achieve this whenever the problem occurs.

       

      Do you have another idea? Or I don't understand?

       

      Thanks!

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        1) Use the wildcards in your name mapping.  That will let all the similar objects be found in one place in the mapping.

        2) If the app changes, the test has to change.  In this case we can probably help you fix it easily.  In other cases it might not be so easy.  You might want to look over your tests and see if you can parameterize them or break them into smaller modules to keep those large numbers of tests and steps from biting you in the future.