Page 1 of 1

The pros and cons of using structural tests

PostPosted: Tue May 07, 2013 4:08 pm
by Enriquer
What are the pros and cons of using structural tests versus allowing the recorded FollowLink commands to stay in place?

Re: The pros and cons of using structural tests

PostPosted: Tue May 14, 2013 7:21 am
by eValid
If the FollowLink commands in your script...well, if it's working why fix it.

The reason you'd convert the recorded FollowLink into a structural sequence probably is because the FollowLink doesn't work because the link moves around on the page so much that even Adaptive Playback won't solve the problem.

The big advantage of a structural test is, it makes the test less brittle over time and that will save you work in the long run.

There's some work to be done to get this benefit. You have to identify (in the page) some fixed point that uniquely identifies the element where the link to be followed is on the page. Usually the ID tag is unique and you can use that. If not, then you have to pick some other unique quantity or property to use.

Then you simply insert an IndexFollowLink command to trigger the event on that particular element and you're done.

The big advantage of this extra piece of work is that now your script will be invulnerable to change. If you're been having failures, this effort will be worth it.

eValid Support