Using user-defined batch properties

Eyes provides the SDK method class$batchinfo$addproperty that allows you to associate property key/value pairs with a batch. For example, you can use this method to tag batches with the details of the hardware the tests ran on, or the version of the software application. Each batch can be tagged with multiple property keys, and each key can be associated with multiple values.

After the tests in the batch are run, in the Test manger you can:

  • Search for all batches that are tagged with a set of given key/value pairs

  • See the properties that where assigned to a particular batch

The tag names and values are global for all batches run by a particular team in an organization.

In the article that follows, you can read about:

Assigning properties using the SDK

You can assign a batchinfo object one or more key/value pairs by calling the SDK method class$batchinfo$addproperty as follows:


                                

Each call to this method associates a specifc key/value pair with that batch. In the above example, the batch has the property PropA with the values Val1 and Val2, the property PropB with the value Val1, and the value PropC with the value Val3.

Eyes always retains, as a minimum, the 50 most recently assigned batch property keys and the 50 values most recently associated with that key. If more than 50 properties are defined then older properties that have not been assigned in any batch in the last 30 days are removed.

Filtering for batches based on properties

You can filter the list of batches based on various criteria using the Filter batches tool that appears above the batch list pane on the Test results page.

The available filter criteria are described in the article How to filter and search batches. In addition, filter criteria are displayed for all property keys defined in batches run by a team member. This allows you to filter by specific values of specific properties. These criteria are then checked in addition to any other built in criteria you specify. After you click the Apply button the batches that meet all of the filter criteria are displayed.

For example, the filter shown above selects batches that meet all the following criteria:

  • The Batch name includes the String EKB.

  • The Batch status is Unresolved.

  • The batch started between between April 1 and April 7 2021.

  • User defined property PropA has a value of Val1 or Val2.

  • User defined property PropB has a value of Val1.

Viewing the properties of a batch

When you hover over a batch entry in the batch list, the batch menu is displayed. If you click on the Batch details menu entry, then the following dialog is displayed:

As you can see, in addition to the standard batch attributes, if any user-defined properties are defined for the batch, then they also appear in the dialog. Note that you might need to scroll the dialog to see all of the properties.

Eyes displays at least 50 different custom properties, with 50 different user property values per property.

For further information, see our video, Using Customized Properties to Group Test Results In Applitools Eyes: