Override Behaviour

abstract Automation may need to support variations in implementation based on various factors.

Branch based Behaviour Override

Use cases:
  1. The flow may be different for different types of entities. For example a Free User vs a Paid User may have different flows for accessing some resources.
  2. The Application Under Test (AUT) can have different flavours of the same application. For example, country specific slight changes.
  3. Application behaves differently based on configuration
For the above, use branching flows with Constant Attribute conditions.
Eg. Branch the flow based on conditions like $user._isPaid? or $salesforce._isClassic? or $application._isEuropean

Data Generator Override

Use cases: For the above, add a Data Generator override.
  1. Make sure that you have at least one Condition Node with $user._isAdult in it. Eg. $user._isAdult?.
  2. Go to Entities tab, choose the relevant Entity ($user) and Attribute (age). Go to Data Generator tab. It may look like this:
  3. On the top right, there is a drop down with text For Default{}
  4. Click on it and click on Create New
  5. In the section Matching Path Conditions the condition $user._isAdult? will appear. Check the checkbox next to it. Choose value true.
  6. Click Create. All the data generator fields will still appear, but disabled
  7. Check the Override for immutable combo checkbox. The fields become editable.
  8. Set the Data Generator Type to Number and set the min to 18
  9. Save the Entity
  10. Create another immutable combo with condition $user._isAdult? and value false. In this set the max to 17.
Now whenever a path needs an _isAdult=true user, the age will be set to greater than or equal to 18. For _isAdult=false, it will be set to less than 18.

Valid Values Override

For an adult user, the valid lower boundary value would be 18. For non-adult higher boundary would be 17.
  1. Create Entity Filters as mentioned in the Data Generator Override section.
  2. Go to Positive Validations tab
  3. Default may look like this
  4. Override for Adult
  5. Override for Adult false

Invalid Values Override

For an adult user, 17 should be an invalid value. For non-adult 18 should be an invalid value.
  1. Create Entity Filters as mentioned in the Data Generator Override section.
  2. Go to Negative Validations tab
  3. Default may look like this
  4. Override for Adult
  5. Override for Adult false

UI Element Override

Use cases: For the above, add a UI Element override.
  1. Go to Entities tab, choose the relevant Entity ($coupon) and Attribute (discount). Go to UI Element tab.
  2. On the top right, there is a drop down with text For Default{}
  3. Click on it and click on Create New
  4. In the section Matching Custom Conditions add Name: _isNewUI and Value: true
    In this, _isNewUI is the custom condition and true is the value of that custom condition.
  5. Click Create. All the existing UI Elements will still appear, but disabled
  6. Click on the Override Accessor checkbox to the right of the UI Element we want to override.
    The UI Element and UI Error Element become editable.
  7. Change the UI Elements as they appear for new UI
  8. Save the Entity

Pass the condition/variable during Run

To pass external conditions or variables to a flow, you can follow these steps:
  1. Click on the Run button to open the Run Settings dialog. Click on Advanced Run Settings.
  2. In the External Variables textbox, add your conditions/variables in the form of key-value pairs.
    Each line should contain only one key-value pair in the format key=value.
  3. Click Run. Now, the new UI Element will be used during execution.