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 Value | Found | Action |
JavaFullClassName | org.eclipse.swt.widgets.Shell | org.eclipse.swt.widgets.Shell | |
WndCaption | Client [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.