Sunday, November 14, 2010

Illustration of eValid Structural Commands

From time to time users ask us to provide more examples of how to use the special eValid structural testing commands. These commands provide a way to extract, save, read, and insert values into the DOM of a page.

You would typically use these kinds of eValid commands to convert a script that you have recorded from life (using the eValid recording engine) into one that is immune to changes in the content, or even in the structure, of the page you are testing. This technique is the antidote to the "brittle test" issue -- the complaint made about the record/play method that the recorded scripts break too easily.

Almost every eValid "from-life" recorded script command has a structural equivalent that can be derived easily using the command lexicon and the details of the page that you find from the eValid PageMap command.

It's even possible to use the structural commands to manipulate key variables from within a page. The Value Setting Loop example explains one way to use these special commands to extract a session id from a page and then insert that same session id into the query-string section of a page. This kind of scripting method applies to any number of values that you want to save locally and then communicate back into your playback script. That's a powerful feature worth taking advantage of.

No comments: