Saving time by handling the Snapshot acquisition
During test execution, a Maveryx component, the Runtime UI Inspector, looks at the AUT (Application Under Test), directly at runtime, producing an internal representation of the GUI and its state: the Snapshot.
This Snapshot is passed to another fundamental component of the architecture, the Intelligent UI Objects Recognition Engine, able to explore it and locate the GUI objects encoded in the tests’ scripts. The last step is the execution of the tests’ actions on the corresponding GUI objects by the Robot Component.
A Snapshot is produced for every test action. Obviously the computational cost of this process depends on the dimension and the complexity of the AUT’s GUI. But producing this Snapshot is not always necessary.
Sometimes you want to execute some actions without taking new Snapshots for all of them because the state of the application and its GUI won’t change till a specific action will be performed.
For example, you want to fill a registration form and click on a “Finish” button at the end of the process.
In this scenario, taking a Snapshot before filling a form’s field could be useless, and paying the computational cost pointless.
The following easy example was created by using the Java API and JUnit as a test manager. The test script just unchecks some checkboxes.
Just after the launch of the AUT, as described in the “AUT launch file” CheckBoxDemo.xml, the method MaveryxRuntimeConfiguration.setTakeSnapshot(false);
takes a last Snapshot till the line
MaveryxRuntimeConfiguration.setTakeSnapshot(true);
that sets the UI Inspector to the default value and behaviour.
Obviously, this example can not cover all the things to say about the Snapshot handling. It is hopefully a cue to start a possible thread on this item. If you are interested don’t be shy and feel free to ask and contribute.