A way I try to cut out duplicate mapped objects, like navigation links, is by having a parent page object wherein the URL consists of only the official name of the site capped with *s. I map all of m...
Lockable Mapped Objects
tristaanogre
7 years agoEsteemed Contributor
Here's the deal: recording is good in limited ways. It allows you to record stuff for automation quickly for rapid turnaroun. Recording is BAD for persisting long term test cases because you will inevitably have timing issues, object recognition issues, etc., that you will need to manually adjust for anyways.
In my experience using TestComplete (and, in fact, with any record/playback automation tool), you'll almost ALWAYS go back and edit what you recorded. For TestComplete, this means both NameMapping as well as test code/steps. Automatic NameMapping doesn't always take into consideration properties that may be dynamic. Also, it only keeps things unique so long as there's not something else similar. For example, when working with a web application, I've had it record an HTML table object as just simply by the ObjectType of "Table" when there are other tables sharing the same level in the tree. This causes some issues down the road.
What I use recording for is for discovery:
1) How does TestComplete interpret the user actions?
2) What components need to be mapped?
3) What is the logical flow of the test steps as interpreted by code?
From there, I almost ALWAYS go back and make edits. Edits would consist of but aren't necessarily limited to.
1) Correcting mapping criteria to account for dynamic values and more accurate unique property/value pairs
2) Adjusting automation timing to account for page loads, dynamically created objects, etc
3) Adding loops like for and while to make the automation more efficient
4) Adding if/then logic for object identification and verification for workflow (if an object doesn't exist when I want it to, throw exception and error out gracefully)
Related Content
- 2 years ago
- 7 years ago
- 12 years ago