Adaption Rules

Here you can edit rules to change tests as they are replayed. We call this "passive update". This gives much greater flexibility to adapt a large set of recorded or generated tests, while at the same time being much less effort. It also allows to make tests much more flexible and adaptable, by e.g. allowing popups to appear or disappear and treat them accordingly.

The language to define those rules is BeanShell. A quick introduction into the basic syntax can be found here. It is essentially simplified Java.

The order in which the scripts are executed during replay is as follows:

  • First, additional actions are inserted into the test and directly executed, as long as actions are returned from the "insert actions" script. If more than the configured property "de.retest.maxInsertedActions" actions are inserted, an exception is triggered, to avoid endless loops.
  • Then, the "nextAction" is skipped, if the "skip action" script returns true.
  • If the action isn't skipped, it is modified according to the "change action" script.

Keep this order in mind when referencing predefined variables in the script. Predefined variables are:

  • windows referencing a list of the current windows
  • previousAction references the previously executed action. This refers to the last inserted action, if an action was inserted.
  • nextAction references the next to be executed action.

More commands and information can be found in the online documentation. If you feel that the information passed to the scripts in insufficient to your needs, please contact support (left bottom).

For some simple examples of BeanShell, please have a look at our demo.



Haben Sie einen Fehler gefunden oder möchtes etwas verbessern? Hier klicken